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
python3 - 2to3 + miscell obvious tweaks
[sfa.git]
/
sfa
/
util
/
sfatime.py
diff --git
a/sfa/util/sfatime.py
b/sfa/util/sfatime.py
index
9752d32
..
6793ad5
100644
(file)
--- a/
sfa/util/sfatime.py
+++ b/
sfa/util/sfatime.py
@@
-20,7
+20,7
@@
# OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
# IN THE WORK.
#----------------------------------------------------------------------
# OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
# IN THE WORK.
#----------------------------------------------------------------------
-from __future__ import print_function
+
import time
import datetime
import time
import datetime
@@
-80,7
+80,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
, long
)):
+ elif isinstance(input, (int, float)):
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))