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

Andreas Jung andreas at andreas-jung.com
Tue Oct 21 09:39:12 EDT 2003


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

Modified Files:
	DateTime.py 
Log Message:

     - Collector #951: DateTime(None) is now equal to DateTime()



=== Zope/lib/python/DateTime/DateTime.py 1.87 => 1.88 ===
--- Zope/lib/python/DateTime/DateTime.py:1.87	Tue Oct 21 09:09:06 2003
+++ Zope/lib/python/DateTime/DateTime.py	Tue Oct 21 09:39:10 2003
@@ -632,16 +632,14 @@
         ac=len(args)
         millisecs = None
 
-        if ac and args[0]==None: 
-            raise self.SyntaxError, None
-        elif ac==10:
+        if ac==10:
             # Internal format called only by DateTime
             yr,mo,dy,hr,mn,sc,tz,t,d,s=args                  
         elif ac == 11:
             # Internal format that includes milliseconds.
             yr,mo,dy,hr,mn,sc,tz,t,d,s,millisecs=args
 
-        elif not args:
+        elif not args or (ac and args[0]==None):
             # Current time, to be displayed in local timezone
             t = time()
             lt = safelocaltime(t)




More information about the Zope-Checkins mailing list