Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65078 > unrolled thread

Improving support for timezones in Python (was: UTC "timezone" causing brain explosions)

Started byBen Finney <ben+python@benfinney.id.au>
First post2014-01-31 13:26 +1100
Last post2014-01-31 13:26 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

#65078 — Improving support for timezones in Python (was: UTC "timezone" causing brain explosions)

FromBen Finney <ben+python@benfinney.id.au>
Date2014-01-31 13:26 +1100
SubjectImproving support for timezones in Python (was: UTC "timezone" causing brain explosions)
Message-ID<mailman.6187.1391135203.18130.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web