ES now returns timestamp as milliseconds vs seconds

Change-Id: I54e3abb2d2547b97423fe512221d32f0ec74a8ff
This commit is contained in:
Tong Li 2016-02-12 14:44:52 -05:00
parent b93ded41ed
commit d8f3f770e4
1 changed files with 2 additions and 0 deletions

View File

@ -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))