Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floor date with timezone can be buggy #399

Closed
ibiris opened this issue Mar 31, 2016 · 1 comment
Closed

Floor date with timezone can be buggy #399

ibiris opened this issue Mar 31, 2016 · 1 comment

Comments

@ibiris
Copy link

@ibiris ibiris commented Mar 31, 2016

lubridate::floor_date(lubridate::ymd("2016-03-31", tz="Europe/Helsinki") , unit="month")
returns [1] "2016-02-29 23:00:00 EET"
I expected this to return "2016-03-01 EET".

As a comparison
lubridate::floor_date(lubridate::ymd("2016-03-01", tz="Europe/Helsinki") , unit="month")
returns [1] "2016-03-01 EET"

and so do all dates between "2016-03-01" and "2016-03-27". The error seems to occur for

"2016-03-28"
"2016-03-29"
"2016-03-30"
"2016-03-31"

My session info
`R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10

locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=fi_FI.UTF-8 LC_COLLATE=en_GB.UTF-8 LC_MONETARY=fi_FI.UTF-8
[6] LC_MESSAGES=en_GB.UTF-8 LC_PAPER=fi_FI.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=fi_FI.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] magrittr_1.5 tools_3.2.3 lubridate_1.5.0 stringi_1.0-1 stringr_1.0.0 radar_0.1`

@vspinu vspinu closed this in 5dfec2f Apr 5, 2016
@ibiris
Copy link
Author

@ibiris ibiris commented Apr 6, 2016

thanks @vspinu, I appreciate this fix!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant