[Zope-Checkins] CVS: Zope/lib/python/DateTime - DateTime.py:1.71.2.4

Jim Fulton jim@zope.com
Mon, 14 Jan 2002 15:37:46 -0500


Update of /cvs-repository/Zope/lib/python/DateTime
In directory cvs.zope.org:/tmp/cvs-serv29054

Modified Files:
      Tag: Zope-2_5-branch
	DateTime.py 
Log Message:
Fixed bug in handling numneric time-zone offsets. We need to subtract,
rather than add the offset, since the offset is the offset of the
local time from UT, not the other way around.


=== Zope/lib/python/DateTime/DateTime.py 1.71.2.3 => 1.71.2.4 ===
     except:
         if numericTimeZoneMatch(tz) is not None:
-            return int(tz[1:3])*3600+int(tz[3:5])*60
+            return -int(tz[1:3])*3600-int(tz[3:5])*60
         else:
             return 0 # ??
 
@@ -918,6 +918,7 @@
                 # Check for and skip day of week:
                 if DayOfWeekNames.has_key(s):
                     continue
+                    
             raise self.SyntaxError, st
 
         day=None