Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'pycon': 0.01; 'url:pypi': 0.03; 'subject:Python': 0.06; 'subject:support': 0.07; 'pep': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'programs.': 0.14; 'fiddle': 0.16; 'finney': 0.16; 'precedence': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'storing': 0.16; 'timestamp': 0.16; 'url:peps': 0.16; 'utc': 0.16; 'library': 0.18; 'header:User-Agent:1': 0.23; 'url:dev': 0.24; 'values': 0.27; 'header:X-Complaints-To:1': 0.27; 'converting': 0.30; 'nature': 0.30; 'getting': 0.31; 'continually': 0.31; 'maintains': 0.31; 'writes:': 0.31; 'url:python': 0.33; 'subject: (': 0.35; "can't": 0.35; 'library.': 0.36; 'received:com.au': 0.36; 'possible': 0.36; 'url:org': 0.36; 'should': 0.36; 'ben': 0.38; 'to:addr:python-list': 0.38; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'national': 0.62; 'our': 0.64; 'more': 0.64; 'url:v': 0.71; 'url:youtube': 0.71; 'url:watch': 0.77; 'manage,': 0.84; 'politicians': 0.84; 'received:125': 0.84; 'relations,': 0.84; 'to/from': 0.84; 'url:video': 0.84; 'canonical': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Improving support for timezones in Python (was: UTC "timezone" causing brain explosions) Date: Fri, 31 Jan 2014 13:26:29 +1100 References: <85eh3qcsr9.fsf@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: vmx15867.hosting24.com.au X-Public-Key-ID: 0xBD41714B X-Public-Key-Fingerprint: 9CFE 12B0 791A 4267 887F 520C B7AC 2E51 BD41 714B X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-gpg.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:q+X8Gwpt8ilywyhvMn2iXXtz9V4= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391135203 news.xs4all.nl 2832 [2001:888:2000:d::a6]:33595 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65078 Ben Finney 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 (video at ). The speaker, Lennart Regebro, maintains a library for getting the local timezone , and is currently working on a PEP to improve timezone support directly in the standard library . 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