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
Support for version 2+ zoneinfo files with fallback TZ variable #590
Comments
I think the reason here is that after the last transition, I'm not sure there's a "right" answer here, but my inclination is that falling back to standard feels right. |
I'm actually not really sure why there's a I think I've probably convinced myself that it's easiest to just take |
Actually, both |
At the moment, we do not support Version 2 files (see dateutilGH-590), and many zones will be inaccurate *today* when dateutil.tz is used with a slim binary. For the moment, we'll force fat binaries. In the long term, we'll migrate to something like zoneinfo.
At the moment, we do not support Version 2 files (see dateutilGH-590), and many zones will be inaccurate *today* when dateutil.tz is used with a slim binary. For the moment, we'll force fat binaries. In the long term, we'll migrate to something like zoneinfo.
At the moment, we do not support Version 2 files (see dateutilGH-590), and many zones will be inaccurate *today* when dateutil.tz is used with a slim binary. For the moment, we'll force fat binaries. In the long term, we'll migrate to something like zoneinfo.
At the moment, we do not support Version 2 files (see dateutilGH-590), and many zones will be inaccurate *today* when dateutil.tz is used with a slim binary. For the moment, we'll force fat binaries. In the long term, we'll migrate to something like zoneinfo.
At the moment, we do not support Version 2 files (see dateutilGH-590), and many zones will be inaccurate *today* when dateutil.tz is used with a slim binary. For the moment, we'll force fat binaries. In the long term, we'll migrate to something like zoneinfo.
At the moment, we do not support Version 2 files (see dateutilGH-590), and many zones will be inaccurate *today* when dateutil.tz is used with a slim binary. For the moment, we'll force fat binaries. In the long term, we'll migrate to something like zoneinfo.
At the moment, we do not support Version 2 files (see dateutilGH-590), and many zones will be inaccurate *today* when dateutil.tz is used with a slim binary. For the moment, we'll force fat binaries. In the long term, we'll migrate to something like zoneinfo.
Previously, `_primitive_time_utils.py` leveraged `dateutil` for datetime timezone arithmetic. However, `dateutil` is unable to properly account for dst offsets when performing datetime arithemtic for dates in the distant future. This is a known `dateutil` bug and more info can be found at: * dateutil/dateutil#462 * dateutil/dateutil#590 This is addressed with PEP615 (https://www.python.org/dev/peps/pep-0615/) for interpreters >=3.9. `backports.zoneinfo` provides backwards compatibility API for interpreters >=3.6, <3.9 which we leverage here. PiperOrigin-RevId: 336909567
When trying to use
hypothesis
to test whether there's a 1->1 mapping ofpytz
zones todateutil
zones, I wrote the following test:This property is falsified by various examples after 2038-01-01:
This is probably partially related to #462, since 2038 is the last year that there transitions in the 32-bit version of the files, but I am guessing that this means that we're doing the "default" rule differently from how
pytz
does it. I'm not sure who is right, but I wouldn't be surprised if it werepytz
. I think we should fix this before #462, because sincepytz
does not support the 64-bit format, once we add support it may break the symmetry without solving the real problem.The text was updated successfully, but these errors were encountered: