[Python-checkins] python/dist/src/Lib _strptime.py, 1.23.4.2,
1.23.4.3
bcannon at users.sourceforge.net
bcannon at users.sourceforge.net
Mon Aug 11 01:19:08 EDT 2003
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv397/Lib
Modified Files:
Tag: release23-maint
_strptime.py
Log Message:
Fix bug where handling issue of time.tzname[0] == time.tzname[1] and
time.daylight were all true. Add an explicit test for this issue.
Closes bug #783952 .
Index: _strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/_strptime.py,v
retrieving revision 1.23.4.2
retrieving revision 1.23.4.3
diff -C2 -d -r1.23.4.2 -r1.23.4.3
*** _strptime.py 8 Aug 2003 01:52:08 -0000 1.23.4.2
--- _strptime.py 11 Aug 2003 07:19:05 -0000 1.23.4.3
***************
*** 494,503 ****
# it can be something other than -1.
found_zone = found_dict['Z'].lower()
! if locale_time.timezone[0] == locale_time.timezone[1] and \
! time.daylight:
! pass #Deals with bad locale setup where timezone info is
! # the same; first found on FreeBSD 4.4.
! elif found_zone in ("utc", "gmt"):
tz = 0
elif locale_time.timezone[2].lower() == found_zone:
tz = 0
--- 494,503 ----
# it can be something other than -1.
found_zone = found_dict['Z'].lower()
! if found_zone in ("utc", "gmt"):
tz = 0
+ elif time.tzname[0] == time.tzname[1] and \
+ time.daylight:
+ continue #Deals with bad locale setup where timezone info is
+ # the same; first found on FreeBSD 4.4.
elif locale_time.timezone[2].lower() == found_zone:
tz = 0
More information about the Python-checkins
mailing list