ES now returns timestamp as milliseconds vs seconds
Change-Id: I54e3abb2d2547b97423fe512221d32f0ec74a8ff
This commit is contained in:
parent
b93ded41ed
commit
d8f3f770e4
|
@ -115,6 +115,8 @@ def utcnow():
|
||||||
|
|
||||||
def iso8601_from_timestamp(timestamp):
|
def iso8601_from_timestamp(timestamp):
|
||||||
"""Returns an iso8601 formatted date from timestamp."""
|
"""Returns an iso8601 formatted date from timestamp."""
|
||||||
|
if timestamp > 1000000000000:
|
||||||
|
timestamp = timestamp / 1000
|
||||||
return isotime(datetime.datetime.utcfromtimestamp(timestamp))
|
return isotime(datetime.datetime.utcfromtimestamp(timestamp))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue