From d4d6afff8d2f17021e21f479a28bf3b97ac18f4d Mon Sep 17 00:00:00 2001 From: Stuart Bishop Date: Wed, 2 Oct 2013 04:12:28 +0000 Subject: Make API differences between pytz and stdlib more noticeable --- Makefile | 2 +- src/README.txt | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 33c6fc6..5f970e5 100644 --- a/Makefile +++ b/Makefile @@ -95,6 +95,7 @@ test_zdump: dist build/dist/test_zdump.py: .stamp-zoneinfo +doc: docs docs: dist mkdir -p build/docs/source/.static @@ -106,7 +107,6 @@ docs: dist chmod -R a+rX build/docs/built upload_docs: upload_docs_pythonhosted upload_docs_sf - @echo Uploaded upload_docs_sf: docs rsync -e ssh -ravP build/docs/built/ \ diff --git a/src/README.txt b/src/README.txt index 56b4fc0..cfc84a0 100644 --- a/src/README.txt +++ b/src/README.txt @@ -14,16 +14,18 @@ Library Reference (``datetime.tzinfo``). Almost all of the Olson timezones are supported. -Note that this library differs from the documented Python API for -tzinfo implementations; if you want to create local wallclock -times you need to use the ``localize()`` method documented in this -document. In addition, if you perform date arithmetic on local -times that cross DST boundaries, the result may be in an incorrect -timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get -2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A -``normalize()`` method is provided to correct this. Unfortunately these -issues cannot be resolved without modifying the Python datetime -implementation. +.. note:: + + This library differs from the documented Python API for + tzinfo implementations; if you want to create local wallclock + times you need to use the ``localize()`` method documented in this + document. In addition, if you perform date arithmetic on local + times that cross DST boundaries, the result may be in an incorrect + timezone (ie. subtract 1 minute from 2002-10-27 1:00 EST and you get + 2002-10-27 0:59 EST instead of the correct 2002-10-27 1:59 EDT). A + ``normalize()`` method is provided to correct this. Unfortunately these + issues cannot be resolved without modifying the Python datetime + implementation (see PEP-431). Installation -- cgit v1.2.1