Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

Timestamp keys are incorrectly mapped to numbers instead of datetime-based strings when invalid #156

Closed
leeren opened this issue Sep 13, 2017 · 0 comments · Fixed by #157
Assignees

Comments

@leeren
Copy link
Contributor

leeren commented Sep 13, 2017

When a timestamp-based key has a corresponding value which is unable to be successfully rendered as a valid timestamp (as in the line below), the timestamp is returned as None and later logged in its corresponding dictionary as a Number value.

ts = _value_to_datetime(val)

This can cause type-conflicting issues when further ingesting output JSON data into analytics services such as Elasticsearch. A simple fix is to always have timestamp-based keys return strings corresponding to super early epoch timestamps (e.g. '1970').

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant