summaryrefslogtreecommitdiffstats
path: root/Doc/lib/tzinfo-examples.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-01-22 04:45:50 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-01-22 04:45:50 (GMT)
commitf196a0a4dde4327dddda49c194ca5cc28c0db1f5 (patch)
treef9735bce70d213cc52dd279324c65debd6a42fa6 /Doc/lib/tzinfo-examples.py
parent51f3f1b7dce6d054891faf9959fc493e66e9f684 (diff)
downloadcpython-f196a0a4dde4327dddda49c194ca5cc28c0db1f5.zip
cpython-f196a0a4dde4327dddda49c194ca5cc28c0db1f5.tar.gz
cpython-f196a0a4dde4327dddda49c194ca5cc28c0db1f5.tar.bz2
"Premature" doc changes, for new astimezone() rules, and the new
tzinfo.fromutc() method. The C code doesn't implement any of this yet (well, not the C code on the machine I'm using now), nor does the test suite reflect it. The Python datetime.py implementation and test suite in the sandbox do match these doc changes. The C implementation probably won't catch up before Thursday (Wednesday is a scheduled "black hole" day this week <0.4 wink>).
Diffstat (limited to 'Doc/lib/tzinfo-examples.py')
-rw-r--r--Doc/lib/tzinfo-examples.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/lib/tzinfo-examples.py b/Doc/lib/tzinfo-examples.py
index b488dd0..5a2b8ad 100644
--- a/Doc/lib/tzinfo-examples.py
+++ b/Doc/lib/tzinfo-examples.py
@@ -27,7 +27,7 @@ class FixedOffset(tzinfo):
"""Fixed offset in minutes east from UTC."""
def __init__(self, offset, name):
- self.__offset = timdelta(minutes = offset)
+ self.__offset = timedelta(minutes = offset)
self.__name = name
def utcoffset(self, dt):
@@ -116,9 +116,9 @@ class USTimeZone(tzinfo):
def dst(self, dt):
if dt is None or dt.tzinfo is None:
# An exception may be sensible here, in one or both cases.
- # It depends on how you want to treat them. The astimezone()
- # implementation always passes a datetime with
- # dt.tzinfo == self.
+ # It depends on how you want to treat them. The default
+ # fromutc() implementation (called by the default astimezone()
+ # implementation) passes a datetime with dt.tzinfo is self.
return ZERO
assert dt.tzinfo is self