def test_milliseconds_to_seconds(self): assert TimestampUtil.milliseconds_to_seconds(10345123) == 10345.123
def extract_timestamp(cls, response): if "fields" in response and "_timestamp" in response["fields"]: _timestamp = response["fields"]["_timestamp"] if _timestamp: return TimestampUtil.milliseconds_to_seconds(_timestamp) return None