[R] How to change time zones?

Gabor Grothendieck ggrothendieck at gmail.com
Tue Mar 7 17:30:20 CET 2006

POSIX objects are UTC internally but can be displayed
with respect to other time zones.

By the way, do you really need time zones in the first
place?  Read R News 4/1 help desk article which will
help you determine which date/time class is
suitable for your application and also has a table
of idioms and other discussion which may be helpful.

On 3/7/06, Jason Horn <jhorn at bu.edu> wrote:
> Say you have a POSIX object that is in UTC.   How do you change the
> values to another timezone?
> If I do this:
> times <- strptime(times, "%H:%M:%S")
> times1 <- as.POSIXct(times, tz="UTC")
> times2 <- as.POSIXct(times, tz="CDT6CST")
> times1 id UTC, but times2 is still UTC, not CTD.  Why? Is the only
> was to change time zones to add seconds to POSIX objects?
>        [[alternative HTML version deleted]]
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list