Browse Source

ES now returns timestamp as milliseconds vs seconds

Change-Id: I54e3abb2d2547b97423fe512221d32f0ec74a8ff
changes/49/279749/1
Tong Li 3 years ago
parent
commit
d8f3f770e4
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      kiloeyes/common/timeutils.py

+ 2
- 0
kiloeyes/common/timeutils.py View File

@@ -115,6 +115,8 @@ def utcnow():
115 115
 
116 116
 def iso8601_from_timestamp(timestamp):
117 117
     """Returns an iso8601 formatted date from timestamp."""
118
+    if timestamp > 1000000000000:
119
+        timestamp = timestamp / 1000
118 120
     return isotime(datetime.datetime.utcfromtimestamp(timestamp))
119 121
 
120 122
 

Loading…
Cancel
Save