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

Shane Hathaway shane@digicool.com
Thu, 9 Aug 2001 13:34:01 -0400

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

Modified Files:
      Tag: NR-branch
Log Message:
Sync NR-branch with trunk.  Sorry about so many checkin messages...

=== Zope/lib/python/DateTime/DateTime.py 1.68 => ===
 from time import timezone, strftime, mktime
 from time import daylight, timezone, altzone
-from types import InstanceType,IntType,FloatType,StringType
+from types import InstanceType,IntType,FloatType,StringType,UnicodeType
 try: from time import tzname
 except: tzname=('UNKNOWN','UNKNOWN')
@@ -700,7 +700,7 @@
             if arg=='':
                 raise self.SyntaxError, arg
-            if type(arg)==StringType and lower(arg) in self._tzinfo._zidx:
+            if type(arg) in [StringType,UnicodeType] and lower(arg) in self._tzinfo._zidx:
                 # Current time, to be displayed in specified timezone
@@ -709,7 +709,7 @@
                 x = _calcDependentSecond(tz, t)
                 yr,mo,dy,hr,mn,sc = _calcYMDHMS(x, ms)
-            elif type(arg)==StringType:
+            elif type(arg) in [StringType,UnicodeType]:
                 # Date/time string
                 if arg.find(' ')==-1 and arg[4]=='-':