summaryrefslogtreecommitdiffstats
path: root/Doc/lib/tzinfo-examples.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-01-20 22:54:38 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-01-20 22:54:38 (GMT)
commit327098a613924b4c06e6d79018881aad7939261e (patch)
tree3e6a711d6ab2313bdef80012909de3e3a0769ff1 /Doc/lib/tzinfo-examples.py
parent4440f22e987f2ccfb798eb8df349884082cccb64 (diff)
downloadcpython-327098a613924b4c06e6d79018881aad7939261e.zip
cpython-327098a613924b4c06e6d79018881aad7939261e.tar.gz
cpython-327098a613924b4c06e6d79018881aad7939261e.tar.bz2
New rule for tzinfo subclasses handling both standard and daylight time:
When daylight time ends, an hour repeats on the local clock (for example, in US Eastern, the clock jumps from 1:59 back to 1:00 again). Times in the repeated hour are ambiguous. A tzinfo subclass that wants to play with astimezone() needs to treat times in the repeated hour as being standard time. astimezone() previously required that such times be treated as daylight time. There seems no killer argument either way, but Guido wants the standard-time version, and it does seem easier the new way to code both American (local-time based) and European (UTC-based) switch rules, and the astimezone() implementation is simpler.
Diffstat (limited to 'Doc/lib/tzinfo-examples.py')
-rw-r--r--Doc/lib/tzinfo-examples.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/lib/tzinfo-examples.py b/Doc/lib/tzinfo-examples.py
index cea0309..b488dd0 100644
--- a/Doc/lib/tzinfo-examples.py
+++ b/Doc/lib/tzinfo-examples.py
@@ -91,7 +91,7 @@ def first_sunday_on_or_after(dt):
DSTSTART = datetime(1, 4, 1, 2)
# and ends at 2am (DST time; 1am standard time) on the last Sunday of Oct.
# which is the first Sunday on or after Oct 25.
-DSTEND = datetime(1, 10, 25, 2)
+DSTEND = datetime(1, 10, 25, 1)
class USTimeZone(tzinfo):