-
Notifications
You must be signed in to change notification settings - Fork 683
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
Runtime support for setting the binary tzdb directory path #626
Comments
Hi Vaughan, |
And I'm behind on reviewing PR's. I should have more time available soon. |
Jiri, Thanks for bringing that up! I read that PR pretty closely before opening this. While I'd probably use pieces of that to fixup the support for Windows in the binary tzdb parser, I'll admit that I wasn't the biggest fan of relying on environment variables for the paths. It is otherwise a nice step towards what I eventually want to accomplish! We've had issues in the past where we relied on CCTZ, which uses the TZDIR env var, and situations out of our control changed the TZDIR environment variable out from under us, causing issues like this one tidyverse/lubridate#928 (this affected a lot of R users on Mac, sadly). It would be much nicer to be able to point date to a specific path at runtime that is completely separate from any env var. That would have prevented this issue. This is also an old outstanding CCTZ issue requesting support for something like this (also by a lubridate R package co-author) google/cctz#6. With this approach, clients could probably even point I don't think I quite understood what the I also liked that my approach separated out the idea of Overall I think my suggestion is a just bit more focused, and builds off some of my own pain points with those env vars. |
Hi Davis I have submitted another PR with just the changes to allow users to use a |
Hmm, I’m not certain that would feed well into a future PR where support for the binary parser on Windows is added. If binary support is added on Windows, we will need to find the custom supplied tzdb, but I don’t think the way to do that on Windows would be by calling It also still feels odd to me to mix the idea of |
Pre-requisite for #564
Hi Howard,
I am very motivated to add support for using a binary tzdb on Windows. I hope that that is something that you would also be interested in, and would be willing to add support for, even though you are on a feature freeze.
As a first step, I've added a PR to my own R package (that uses
<date>
) with changes to the tz code to allow for setting the binary tzdb path at runtime. It seems to work pretty well for me with binary files I pulled from CCTZ's github repo. It currently is only allowed for non-Windows platforms, because I have a feeling the binary parser might have to be tweaked for Windows. Nevertheless, this is a required step for Windows support, since I'd have to provide a binary tzdb in a custom location for that platform. It will also be useful for me on non-Windows platforms, as I can standardize on a specific tzdb version across all platforms.I've documented the changes in the PR, and would love the opportunity to include them as a PR into date if you think they are appropriate. I've tried to be as backwards compatible as possible. The first 3 commits are relevant to you. Ignore the large amount of changed files, those are just the binary zoneinfo files.
r-lib/clock#6
Let me know what you think!
The text was updated successfully, but these errors were encountered: