[R] bug in difftime with as.POSIXct
Dan Kelley
Dan.Kelley at dal.ca
Sun Jan 27 20:20:26 CET 2008
Oh, I'm sorry to be posting a reply to my own stupid question, but the
problem is that I had not specified GMT, and so it was using local time,
which changes to 'save daylight". This is demonstrated below:
> unclass(as.POSIXct("1975-04-27",tz="GMT"))[1]-unclass(as.POSIXct("1975-04-28",tz="GMT"))[1]
[1] -86400
> unclass(as.POSIXct("1975-04-27"))[1]-unclass(as.POSIXct("1975-04-28"))[1]
[1] -82800
--
View this message in context: http://www.nabble.com/bug-in-difftime-with-as.POSIXct-tp15122749p15122755.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list