views:

41

answers:

2

Where can I find a list of all legal time names for R function as.POSIXct? 'as.POSIXct("1970-01-01",tz="CST")' will generate warning that "CST" (Central Standard Time) is unknown. Thanks

+4  A: 

?Sys.timezone has some hints, specifically to look in: "R_HOME/share/zoneinfo/zone.tab" (R_HOME is the directory R is installed in). Keep in mind that time zones are nasty and many of their nuances are operating system (and locale?) specific.

In your specific case, you want "CST6CDT" instead of "CST".

Joshua Ulrich
Thanks, so I should use EST5EDT rather than EST? this is not obvious...
ahala
Yes, or you can use "America/New_York" as defined in the "zones.tab" file. As I said, nasty...
Joshua Ulrich