Re: [R] time zones in POSIXt

2004-04-24 Thread Gabor Grothendieck
I think this is a problem with difftime (which gets called when the subtraction in your example is invoked). The first few lines of difftime are: function (time1, time2, tz = , units = c(auto, secs, mins, hours, days, weeks)) { time1 - as.POSIXct(time1, tz = tz) time2 -

RE: [R] time zones in POSIXt

2004-04-24 Thread Prof Brian Ripley
On Fri, 23 Apr 2004, Vadim Ogranovich wrote: Thank you for the lead, Dirk! Indeed this works on my machine too: as.POSIXct(2000-05-10 10:15:00, tz=PST8PDT) - as.POSIXct(2000-05-10 10:15:00, tz=GMT) Time difference of 7 hours However when I replace POSIXct by POSIXlt it breaks (this

Re: [R] time zones in POSIXt

2004-04-24 Thread Gabor Grothendieck
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.

Re: [R] time zones in POSIXt

2004-04-23 Thread Dirk Eddelbuettel
On Fri, Apr 23, 2004 at 11:30:19AM -0700, Vadim Ogranovich wrote: Hi, 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

RE: [R] time zones in POSIXt

2004-04-23 Thread Vadim Ogranovich
-Original Message- From: Dirk Eddelbuettel [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 1:52 PM To: Vadim Ogranovich Cc: R-Help Subject: Re: [R] time zones in POSIXt On Fri, Apr 23, 2004 at 11:30:19AM -0700, Vadim Ogranovich wrote: Hi, I have two data sources