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
one hour difference for "Europe/London" #86
Comments
Oops, sorry for the duplicate. |
Well I wish it wasn't a dupe or even single bug in the sense that I wish that Boost did the right thing here but something seems vexed with London :-/ There has not been that much development upstream to that part of Boost so I am not sure this will ever get perfect. Which was part of the reason I added the R fallback. Not perfect, but I have not been able to come up with something better. |
R's fedora likely sets system time zone to "Europe/London", that's why some unit tests failed. Now I skip these tests for London, |
Good to know you have a workaround. I can't quite work out whether the bug simply is that UTC (which has no daylight savings) and Europe/London (which has) are confused here and a weird correction is in place -- as UTC is often substituted in when nothing else is set. In any event, it is a known wart for |
Re
Several alternatives of "Europe/London" have no problem. tzvec <- c(
"Europe/London",
"GB",
"GB-Eire",
"Europe/Belfast",
"Europe/Guernsey",
"Europe/Isle_of_Man"
)
test_timezone <- function(tz) {
withr::local_envvar(c("TZ" = tz))
x <- "2016-12-09 09:10"
format(anytime::utctime(x, tz = "UTC"))
}
for (i in seq_along(tzvec)) {
print(callr::r(test_timezone, args = list(tz = tzvec[i])))
}
#> [1] "2016-12-09 10:10:00"
#> [1] "2016-12-09 09:10:00"
#> [1] "2016-12-09 09:10:00"
#> [1] "2016-12-09 09:10:00"
#> [1] "2016-12-09 09:10:00"
#> [1] "2016-12-09 09:10:00" Created on 2018-12-09 by the reprex package (v0.2.1) In addition to skipping tests, I've also added a warning if system time zone is set to I would also add a new section in the documentation regarding |
Good stuff. But you based this on the R documentation and parameters. Whereas Edit: Disgregard that comment. I was commenting from my phone. |
That had been my best line of defence too. Almost as if it is used as / confused with |
My bad. It's |
Dang. I couldawouldashoulda have checked myself. Will fix. Done: 36b627d |
Hi Dirk,
I have run through all possible time zones specified here. There's always one hour difference for London, regardless of date-time inputs and OS. Other time zones work as expected.
Created on 2018-12-08 by the reprex package (v0.2.1)
The text was updated successfully, but these errors were encountered: