r - switch to DST: round_date() returns NAs -
In 2013, the Central European Time (CET) took place on Sunday, 2013 for Central European Summer Time (CETT) - 2013,
03-31. Clocks are upgraded from one hour to 2 pm to 3 o'clock, so basically no 2am is there.
get started & lt; - strptime ("2013-03-31 01:00:00", format = "% F% T", tz = "CET") bar & lt; - Start + (0: 5) * 60 * 15 times [1] "2013-03-31 01:00:00 CET" 2013-03-31 01:15:00 CET "[3]" 2013-03-31 01:30:00 CET "2013-03-31 01:45:00 CET" [5] "2013-03-31 03:00:00 CET" "2013-03-31 03:15:00 CEST" < / Code> vector bar returns the NAS by rotating in hours, even before 01:30, before the bar library (lubridate) round_date (time, unit = "hour") [1] "2013-03-31 01:00:00 CET" NA [3] NA NA [5] NA "2013-03-31 03:00:00 CET" Is this a bug, or am I missing something? I'm running:
sessionInfo () R Version 3.1.0 (2014-04-10) Platform: x86_64-W64-mingw32 / 64 (64-bit) Location: [1] LC_COLLATE = German_Austria.1252 LC_CTYPE = German_Austria.1252 [3] LC_MONETARY = German_Austria.1252 LC_NUMERIC = C [5] LC_TIME = German_Austria.1252 Attached Base Packages: [1] Statistics Graphics GrDevices utils Dataset Methods Support Other Affiliate Packages: [1] lubridate_1 . 3.3 Loaded (and not attached) through a namespace: [1] digest_0.6.4 memoise_0.2.1 plyr_1.8.1 Rcpp_0.11.2 stringr_0.6.2
This is a matter of speed and you can consider the behavior of bugs. round_date uses ceiling_date and there it is: y The basic problem might be "hour" - " POSIXct S4 method.
Comments
Post a Comment