Re: [Datetime-SIG] Add a strftime/strptime code for timezone ID
Does any other programming language actually support IANA zones out of the box? I feel like building in IANA zone support into the language itself is a bad idea, as I think I mentioned in my earlier post. This seems like something that is clearly best handled by third party libraries. Aside from favoring IANA-style zone specifications (which seems unnecessary, especially given that the way the compiled tzdata represents data somewhat inconsistently with Python's tzinfo approach), the distribution of the data seems like it would be a complete nightmare. On 11/03/2016 10:58 AM, Alexander Belopolsky wrote:
On Thu, Nov 3, 2016 at 10:51 AM, Random832 <random832@fastmail.com <mailto:random832@fastmail.com>> wrote:
Remember, Python doesn't actually support IANA timezones out of the box.
I plan to change this in 3.7, but this is a topic for a future PEP.
_______________________________________________ Datetime-SIG mailing list Datetime-SIG@python.org https://mail.python.org/mailman/listinfo/datetime-sig The PSF Code of Conduct applies to this mailing list: https://www.python.org/psf/codeofconduct/
On Fri, Nov 4, 2016 at 2:28 AM, Paul G <paul@ganssle.io> wrote:
Does any other programming language actually support IANA zones out of the box? I feel like building in IANA zone support into the language itself is a bad idea, as I think I mentioned in my earlier post. This seems like something that is clearly best handled by third party libraries.
Yes, Pike does, and it's extremely convenient. Given that Python includes the groundwork for timezone calculations in the stdlib, I think it would be a Good Thing to have actual lookups of "America/New_York" functional out-of-the-box too; whether that's by actually incorporating tzdata in the stdlib or by referencing it elsewhere, Python scripts shouldn't need to care. I believe there was a proposal at one point to have a pip-updateable package, but a stdlib or OS-provided fallback. If it's possible to query the version of the OS-provided tzdata, Python could easily check all three and use the latest one available. ChrisA
participants (2)
-
Chris Angelico
-
Paul G