[R] time zones in POSIXt

Gabor Grothendieck ggrothendieck at myway.com
Sat Apr 24 09:08:01 CEST 2004


Prof Brian Ripley <ripley <at> stats.ox.ac.uk> writes:

: > However when I replace POSIXct by POSIXlt it breaks (this looks like a
: > bug to me):
: > 
: > > as.POSIXlt("2000-05-10 10:15:00",  tz="PST8PDT") -
: > as.POSIXlt("2000-05-10 10:15:00",  tz="GMT")
: > Time difference of 0 secs
: 
: No, it's not a bug.  POSIXlt times are just numeric representations of
: broken-down times, and the tzone attribute (which is normally not present)
: is just a reminder to you.  (It has not been checked, so this is avoid
: nasty surprises if it is wrong.)  Maybe it was a bad idea to allow - for
: POSIXlt times, but then we do expect users to read the documentation
: (including the code if they are puzzled).

This this is by design then its a bug by virtue of being a design error.




More information about the R-help mailing list