You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any possibility to support ISO 8601 compatible standard timestamp format (yyyy-mm-ddThh:mm:ss+-ZONE) with timezone offset?
library(anytime)
Sys.setenv(TZ=anytime:::getTZ()) ## helper function to try to get TZ
anytime("2016-12-13T17:09:48+01:00")
> anytime("2016-12-13T17:09:48+01:00")
[1] "2016-12-12 23:00:00 UTC"
Thanks,
Dusan
The text was updated successfully, but these errors were encountered:
As you can see, the date is parsed (good, and better than what we have now) but the actual tz argument is always ignored -- and that is documented -- which is bad.
But yes, ISO is good. I will add some variants. Luckily this seems tolerant to with/without T and seems to equally ignore tz suffixes of the -0000 and -00:00 variants.
cat("\n") # ISO 8601 variants, note that TZ field is always ignored, see Boost documentation
anytime(c("2016-09-01T10:11:12-05:00", "2016-09-01T10:11:12.345678-05:00"))
anytime(c("2016-09-01T10:11:12-0500", "2016-09-01T10:11:12.345678-0500"))
anytime(c("2016-09-01T10:11:12 CDT", "2016-09-01T10:11:12.345678 CDT"))
The wierd thing is that the ones on the right were already being parsed in the just-release 0.1.2. Now we also get the ones on the left which is good.
Is there any possibility to support ISO 8601 compatible standard timestamp format (yyyy-mm-ddThh:mm:ss+-ZONE) with timezone offset?
Thanks,
Dusan
The text was updated successfully, but these errors were encountered: