summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Bishop <stuart@stuartbishop.net>2014-05-15 08:49:38 +0000
committerStuart Bishop <stuart@stuartbishop.net>2014-05-15 08:49:38 +0000
commit54b09ec9de8f5a1ab29a261db4a465b9bb27e159 (patch)
tree2c241a913fc01893b4e7d7be729bb975a4304f93
parente3394706b5d02656f72219dcd91b4c25a873062d (diff)
downloadpytz-release_2014.3.tar.gz
Fix unsupported syntax in README.txtrelease_2014.3
-rw-r--r--src/README.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/README.txt b/src/README.txt
index b645715..ec99210 100644
--- a/src/README.txt
+++ b/src/README.txt
@@ -249,11 +249,12 @@ happens:
and 01:00 happens again (this time 01:00 EST)
In fact, every instant between 01:00 and 02:00 occurs twice. This means
-that if you try and create a time in the 'US/Eastern' timezone using
+that if you try and create a time in the 'US/Eastern' timezone
the standard datetime syntax, there is no way to specify if you meant
-before of after the end-of-daylight-saving-time transition.
+before of after the end-of-daylight-saving-time transition. Using the
+pytz custom syntax, the best you can do is make an educated guess:
->>> loc_dt = datetime(2002, 10, 27, 1, 30, 00, tzinfo=eastern)
+>>> loc_dt = eastern.localize(datetime(2002, 10, 27, 1, 30, 00))
>>> loc_dt.strftime(fmt)
'2002-10-27 01:30:00 EST-0500'