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

The JSON Parser Should Support Configuring a Timezone #5463

Closed
ddrinka opened this issue Feb 21, 2019 · 4 comments
Closed

The JSON Parser Should Support Configuring a Timezone #5463

ddrinka opened this issue Feb 21, 2019 · 4 comments
Labels
feature request Requests for new plugin and for new features to existing plugins
Milestone

Comments

@ddrinka
Copy link
Contributor

ddrinka commented Feb 21, 2019

Feature Request

I have a data source that logs JSON data in local time, with no timezone indicator in the log. The data is parseable by the JSON Parser, but the timestamps are written to the database as UTC rather than as local timestamps.

Proposal:

The Grok Parser is a useful prototype of how I expect to be able to configure a timezone.

I'd like to add a clone of internal.ParseTimestamp to accept a timezone string as well as a time format, and use the new function with an optional configuration parameter in the JSON Parser.

I plan to contribute a PR for this functionality.

@danielnelson
Copy link
Contributor

Are these unix epoch timestamps like 1550794308 or human readable timestamps more like Feb 21 11:27:02?

@ddrinka
Copy link
Contributor Author

ddrinka commented Feb 22, 2019

Human readable. Unix epoch timestamps should by definition be UTC.

@danielnelson
Copy link
Contributor

Yes agreed. This sounds great, just call the new option json_timezone?

@danielnelson danielnelson added feature request Requests for new plugin and for new features to existing plugins and removed need more info labels Feb 22, 2019
@ddrinka
Copy link
Contributor Author

ddrinka commented Feb 22, 2019

@danielnelson Great, this is working fine in production for me. Attached is the PR.

@danielnelson danielnelson added this to the 1.10.0 milestone Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

2 participants