Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize DateTimes #11

Open
andrewkrug opened this issue Mar 7, 2017 · 4 comments
Open

Standardize DateTimes #11

andrewkrug opened this issue Mar 7, 2017 · 4 comments

Comments

@andrewkrug
Copy link
Member

TypeError: datetime.datetime(2017, 3, 6, 19, 13, 16) is not JSON serializable occurs in python for warm_since and warm_for

Let's move them all to same format.

@tnem
Copy link
Contributor

tnem commented Mar 8, 2017

My vote is for using a long that's just time since epoch.

@andrewkrug
Copy link
Member Author

@tnem I agree on this. It makes it way easier in elastic. But we should also make sure it's something that we can use as elastic's timestamp.

@jeffbryner
Copy link
Contributor

Any reason not to do both? i.e. epoch and ISO formatted, human readable? ES will store either as epoch internally if the field is mapped as datetime, but it will help folks looking at the json if it's in both.

@andrewkrug
Copy link
Member Author

@jeffbryner why not... as long as they can both go through json.dumps() and json.loads() I was getting errors with python's straight up "DateTime" type.

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

No branches or pull requests

3 participants