[R] time zones in POSIXt
edd at debian.org
Fri Apr 23 22:52:27 CEST 2004
On Fri, Apr 23, 2004 at 11:30:19AM -0700, Vadim Ogranovich wrote:
> I have two data sources. One records time in PST time zone, the other in
> GMT. I want to compute the difference between the two, but don't see
> how. Here is an example where I compute time difference between
> identical times each (meant to be) relative to its time zone.
> > as.POSIXlt("2000-05-10 10:15:00", "PST") - as.POSIXlt("2000-05-10
> 10:15:00", "GMT")
> Time difference of 0 secs
> I was expecting to see 8hrs (which is the time difference between London
> and San-Francisco). Why is it so and what is the correct way of doing
Seems to work with POSIXct in 1.8.1 and 1.9.0:
> as.POSIXct("2000-05-10 10:15:00", "PST8PDT") - as.POSIXct("2000-05-10
Time difference of 7 hours
> I use R-1.8.1 on RH-7.3.
> [[alternative HTML version deleted]]
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
The relationship between the computed price and reality is as yet unknown.
-- From the pac(8) manual page
More information about the R-help