utcparse now supports longs
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Mon, 26 Dec 2011 04:42:51 +0000 (23:42 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Mon, 26 Dec 2011 04:42:51 +0000 (23:42 -0500)
sfa/util/sfatime.py

index 473056e..d2699f4 100644 (file)
@@ -22,7 +22,7 @@ For safety this can also handle inputs that are either timestamps, or datetimes
         if t.utcoffset() is not None:
             t = t.utcoffset() + t.replace(tzinfo=None)
         return t
-    elif isinstance (input, (int,float)):
+    elif isinstance (input, (int,float,long)):
         return datetime.datetime.fromtimestamp(input)
     else:
         logger.error("Unexpected type in utcparse [%s]"%type(input))