Colleagues, I just encountered some unexpected behavior of difftime in relationship to the change from daylight savings to standard time. My understanding is that DST and ST take effect at 2AM. However, the code below suggests that R (version 2.8.0 in OS X) implements the change at 2:16AM:
Expected: > > difftime("2008-11-02 02:01:00", "2008-11-02 00:59:00") > Time difference of 2.033333 hours > > difftime("2008-11-02 01:16:00", "2008-11-02 01:15:00") > Time difference of 1 mins > > difftime("2008-11-02 01:18:00", "2008-11-02 01:17:00") > Time difference of 1 mins Not expected: > > difftime("2008-11-02 01:17:00", "2008-11-02 01:16:00") > Time difference of 1.016667 hours Can anyone explain this? Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-415-564-2220 www.PLessThan.com [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.