git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
utcparse now supports longs
[sfa.git]
/
sfa
/
util
/
sfatime.py
diff --git
a/sfa/util/sfatime.py
b/sfa/util/sfatime.py
index
473056e
..
d2699f4
100644
(file)
--- a/
sfa/util/sfatime.py
+++ b/
sfa/util/sfatime.py
@@
-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
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))
return datetime.datetime.fromtimestamp(input)
else:
logger.error("Unexpected type in utcparse [%s]"%type(input))