diff options
author | Guido van Rossum <guido@python.org> | 1998-05-18 16:09:10 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-05-18 16:09:10 (GMT) |
commit | 67133e25a28ad2d1117fb976499b67f5955f877a (patch) | |
tree | 0513ff4b80323f62de96e6523f6b9c6fc4667073 /Lib | |
parent | 3130b7a2a97dbb322342b248cb9d9fae5b89b8f5 (diff) | |
download | cpython-67133e25a28ad2d1117fb976499b67f5955f877a.zip cpython-67133e25a28ad2d1117fb976499b67f5955f877a.tar.gz cpython-67133e25a28ad2d1117fb976499b67f5955f877a.tar.bz2 |
Neatify the _timezones table and remove a misleading comment about
inaccuracies in mktime_tz().
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/rfc822.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py index 9d76f6d..9e9faee 100644 --- a/Lib/rfc822.py +++ b/Lib/rfc822.py @@ -632,11 +632,11 @@ _daynames = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] # instead of timezone names. _timezones = {'UT':0, 'UTC':0, 'GMT':0, 'Z':0, - 'AST': -400, 'ADT': -300, # Atlantic standard + 'AST': -400, 'ADT': -300, # Atlantic (used in Canada) 'EST': -500, 'EDT': -400, # Eastern - 'CST': -600, 'CDT':-500, # Centreal - 'MST':-700, 'MDT':-600, # Mountain - 'PST':-800, 'PDT':-700 # Pacific + 'CST': -600, 'CDT': -500, # Central + 'MST': -700, 'MDT': -600, # Mountain + 'PST': -800, 'PDT': -700 # Pacific } @@ -713,14 +713,7 @@ def parsedate(data): def mktime_tz(data): - """Turn a 10-tuple as returned by parsedate_tz() into a UTC timestamp. - - Minor glitch: this first interprets the first 8 elements as a - local time and then compensates for the timezone difference; - this may yield a slight error around daylight savings time - switch dates. Not enough to worry about for common use. - - """ + """Turn a 10-tuple as returned by parsedate_tz() into a UTC timestamp.""" if data[9] is None: # No zone info, so localtime is better assumption than GMT return time.mktime(data[:8] + (-1,)) |