aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/i18n.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Mailman/i18n.py b/Mailman/i18n.py
index 810f1566..890ecab6 100644
--- a/Mailman/i18n.py
+++ b/Mailman/i18n.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2003 by the Free Software Foundation, Inc.
+# Copyright (C) 2000-2006 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -12,7 +12,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
import sys
import time
@@ -107,7 +108,8 @@ def ctime(date):
if isinstance(date, StringType):
try:
year, mon, day, hh, mm, ss, wday, ydat, dst = time.strptime(date)
- tzname = time.tzname[dst and 1 or 0]
+ if dst in (0,1):
+ tzname = time.tzname[dst]
except (ValueError, AttributeError):
try:
wday, mon, day, hms, year = date.split()
@@ -132,7 +134,8 @@ def ctime(date):
break
else:
year, mon, day, hh, mm, ss, wday, yday, dst = time.localtime(date)
- tzname = time.tzname[dst and 1 or 0]
+ if dst in (0,1):
+ tzname = time.tzname[dst]
wday = daysofweek[wday]
mon = months[mon]