Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #65078
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Subject | Improving support for timezones in Python (was: UTC "timezone" causing brain explosions) |
| Date | 2014-01-31 13:26 +1100 |
| References | <CANc-5UyOGNWdug-JvXe_RMn9V7BCGFyZ0NwtSjFMFaW1f_wfhw@mail.gmail.com> <85eh3qcsr9.fsf@benfinney.id.au> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6187.1391135203.18130.python-list@python.org> (permalink) |
Ben Finney <ben+python@benfinney.id.au> writes: > Time zones are a hairy beast to manage, made all the more difficult > because national politicians continually fiddle with them which means > they can't just be a built-in part of the Python standard library. PyCon 2013 had a good talk on calendaring and timezone issues <URL:http://www.pyvideo.org/video/1765/blame-it-on-caesar-what-you-need-to-know-about-d> (video at <URL:https://www.youtube.com/watch?v=GBKqRhn0ekM>). The speaker, Lennart Regebro, maintains a library for getting the local timezone <URL:https://pypi.python.org/pypi/tzlocal>, and is currently working on a PEP to improve timezone support directly in the standard library <URL:http://www.python.org/dev/peps/pep-0431/>. He also reinforces the message that UTC is the canonical timezone for storing and manipulating timestamp values, and we should be converting to/from those canonical values as early/late as possible in our programs. -- \ “Reality must take precedence over public relations, for nature | `\ cannot be fooled.” —Richard P. Feynman | _o__) | Ben Finney
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Improving support for timezones in Python (was: UTC "timezone" causing brain explosions) Ben Finney <ben+python@benfinney.id.au> - 2014-01-31 13:26 +1100
csiph-web