Skip to content
Prev 169949 / 398506 Next

Strange behaviour of ISOdatetime

Have you checked that that time exists in the time zone you are using?  From ?ISOdatetime:

Note
...
Remember that in most timezones some times do not occur and some occur twice because of transitions to/from summer time. What happens in those cases is OS-specific. 

You could try working out what your system is using as the transition to/from summer time.  (If you need to generate times that are 2 hours after midnight, try using ISOdatetime to generate the midnight times and add 2 hours).

On my system, all this works fine:
[1] "1995-03-26 02:00:00 MST"
[1] "1995-03-26 02:00:00 MST"
R version 2.8.1 (2008-12-22) 
i386-pc-mingw32 

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] TimeWarp_0.7    abind_1.2-0     trackObjs_0.8-0 tap.misc_1.0   
[5] bmc.misc_1.0    RtTests_0.1-5
-- Tony Plate
Pedro de Barros wrote: