fastr icon indicating copy to clipboard operation
fastr copied to clipboard

strptime not work at CST time zone

Open comicfans opened this issue 7 years ago • 3 comments

just run strptime('2013-04-04','%Y-%m-%d'), fastR throws error

Fri Nov 09 19:43:57 CST 2018 com.oracle.truffle.r.runtime.RInternalError: java.time.zone.ZoneRulesException: Unknown time-zone ID: CST at com.oracle.truffle.r.nodes.function.FunctionDefinitionNode.execute(FunctionDefinitionNode.java:321) at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callProxy(OptimizedCallTarget.java:289) at org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callRoot(OptimizedCallTarget.java:278)

full log here: fastr_errors_pid22716.log

comicfans avatar Nov 09 '18 11:11 comicfans

Hi comicfans,

thanks for reporting this issue. We can reproduce and the fix should be available soon. In the meantime you can run FastR with environment variable TZ set to CST6CDT, e.g. TZ=CST6CDT graalvm/bin/R... or whichever time zone works for you (e.g. +0800 should work too).

steve-s avatar Nov 09 '18 12:11 steve-s

seems that the "CST" abbreviation is interpreted differently by the system libraries and Java, so the fix will not be that easy. Out of curiosity, what timezone do you intend to use?

steve-s avatar Nov 09 '18 14:11 steve-s

Hi steve,

I want to use +0800 (Asia/Shanghai) timezone , my linux timedatectl output:

           Local time: Sat 2018-11-10 11:10:37 CST
       Universal time: Sat 2018-11-10 03:10:37 UTC
              Time zone: Asia/Shanghai (CST, +0800)

comicfans avatar Nov 10 '18 03:11 comicfans