Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'api': 0.09; 'behave': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sfxlen:2': 0.10; 'systems.': 0.11; 'defer': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'module,': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'posted': 0.21; 'work,': 0.21; 'subject:skip:i 10': 0.22; 'trying': 0.22; 'cc:no real name:2**0': 0.22; 'appears': 0.23; 'demonstrate': 0.23; 'unix': 0.24; 'header:User-Agent:1': 0.26; "doesn't": 0.26; 'header:X-Complaints-To:1': 0.26; 'question': 0.27; 'correct': 0.28; 'arithmetic': 0.29; 'received:comcast.net': 0.33; 'correctly': 0.34; 'asking': 0.35; 'according': 0.36; 'there': 0.36; 'subject:" ': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'received:org': 0.37; 'presence': 0.38; 'why': 0.39; 'to:addr:python.org': 0.40; 'behavior': 0.61; 'subject:there': 0.66; 'saving': 0.70; 'subject:any': 0.84; 'subject:Are': 0.95; 'hand,': 0.97 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Random832 Subject: Are there any "correct" implementations of tzinfo? Date: Sat, 12 Sep 2015 14:23:12 -0400 Mime-Version: 1.0 Content-Type: text/plain X-Gmane-NNTP-Posting-Host: c-68-39-146-59.hsd1.in.comcast.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:KsFacr2jfGmq9T4DklnMi3CYCR8= Cc: datetime-sig@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442082212 news.xs4all.nl 23725 [2001:888:2000:d::a6]:59360 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96446 I was trying to find out how arithmetic on aware datetimes is "supposed to" work, and tested with pytz. When I posted asking why it behaves this way I was told that pytz doesn't behave correctly according to the way the API was designed. The tzlocal module, on the other hand, appears to simply defer to pytz on Unix systems. My question is, _are_ there any correct reference implementations that demonstrate the proper behavior in the presence of a timezone that has daylight saving time transitions?