diff --git a/kiloeyes/common/timeutils.py b/kiloeyes/common/timeutils.py index c48da95..0beda4c 100755 --- a/kiloeyes/common/timeutils.py +++ b/kiloeyes/common/timeutils.py @@ -115,6 +115,8 @@ def utcnow(): def iso8601_from_timestamp(timestamp): """Returns an iso8601 formatted date from timestamp.""" + if timestamp > 1000000000000: + timestamp = timestamp / 1000 return isotime(datetime.datetime.utcfromtimestamp(timestamp))