Hi, Why is there less number of seconds on 03/10/2019 in the internal POSIX system? The difference between the previous or the next day eems to be exactly 1 hour. I could not find anything in the manuals on CRAN.> dates <- as.POSIXct(sprintf('03/%s/2019',9:12), format = '%m/%d/%Y') > dates[1] "2019-03-09 EST" "2019-03-10 EST" "2019-03-11 EDT" "2019-03-12 EDT"> diff(as.numeric(dates[1:2]))[1] 86400> diff(as.numeric(dates[2:3]))[1] 82800> diff(as.numeric(dates[3:4]))[1] 86400 [[alternative HTML version deleted]]
The time has changed from "standard" (EST) to "Daylight saving" (EDT) which shaves off 1 hour. Peter On Sun, Mar 29, 2020 at 5:03 PM Sebastien Bihorel via R-help < r-help at r-project.org> wrote:> Hi, > > Why is there less number of seconds on 03/10/2019 in the internal POSIX > system? The difference between the previous or the next day eems to be > exactly 1 hour. I could not find anything in the manuals on CRAN. > > > dates <- as.POSIXct(sprintf('03/%s/2019',9:12), format = '%m/%d/%Y') > > dates > [1] "2019-03-09 EST" "2019-03-10 EST" "2019-03-11 EDT" "2019-03-12 EDT" > > diff(as.numeric(dates[1:2])) > [1] 86400 > > diff(as.numeric(dates[2:3])) > [1] 82800 > > diff(as.numeric(dates[3:4])) > [1] 86400 > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >[[alternative HTML version deleted]]
Duh !!! Thanks. ________________________________ From: Peter Langfelder <peter.langfelder at gmail.com> Sent: Sunday, March 29, 2020 20:12 To: Sebastien Bihorel <Sebastien.Bihorel at cognigencorp.com> Cc: r-help at r-project.org <r-help at r-project.org> Subject: Re: [R] POSIX system oddities The time has changed from "standard" (EST) to "Daylight saving" (EDT) which shaves off 1 hour. Peter On Sun, Mar 29, 2020 at 5:03 PM Sebastien Bihorel via R-help <r-help at r-project.org<mailto:r-help at r-project.org>> wrote: Hi, Why is there less number of seconds on 03/10/2019 in the internal POSIX system? The difference between the previous or the next day eems to be exactly 1 hour. I could not find anything in the manuals on CRAN.> dates <- as.POSIXct(sprintf('03/%s/2019',9:12), format = '%m/%d/%Y') > dates[1] "2019-03-09 EST" "2019-03-10 EST" "2019-03-11 EDT" "2019-03-12 EDT"> diff(as.numeric(dates[1:2]))[1] 86400> diff(as.numeric(dates[2:3]))[1] 82800> diff(as.numeric(dates[3:4]))[1] 86400 [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org<mailto:R-help at r-project.org> mailing list -- To UNSUBSCRIBE and more, see 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. [[alternative HTML version deleted]]