Update of /cvsroot/mailman/mailman/Mailman
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12854
Modified Files:
i18n.py
Log Message:
Fixed bug 1433673 by fixing ctime() to not use time.tzname[1] when tm_isdst is
-1.
Index: i18n.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/i18n.py,v
retrieving revision 2.13
retrieving revision 2.14
diff -u -d -r2.13 -r2.14
--- i18n.py 28 Aug 2005 05:31:26 -0000 2.13
+++ i18n.py 19 Feb 2006 21:09:02 -0000 2.14
@@ -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 @@
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 @@
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]
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org