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

Local time zone in date formatting #20

Closed
troplin opened this issue Apr 25, 2016 · 5 comments
Closed

Local time zone in date formatting #20

troplin opened this issue Apr 25, 2016 · 5 comments

Comments

@troplin
Copy link

troplin commented Apr 25, 2016

Currently, the time stamp is always UTC but I'd prefer local time.

@sfackler
Copy link
Collaborator

sfackler commented Apr 25, 2016

Allowing this to be configured seems like a good idea. I'm not totally sure what a good syntax would be though. Maybe something like {d(local)(%h:%m etc)}?

@troplin
Copy link
Author

troplin commented Apr 25, 2016

Or {dz} for UTC and {dl} for local?
chrono treats them a different types too.

@jwilm
Copy link
Contributor

jwilm commented Apr 25, 2016

Would it make sense to achieve this with a config option for appenders rather than expanding the format grammar?

@sfackler
Copy link
Collaborator

{dz} and {dl} could work, but we'd presumably want to extend this to explicit timezones in the future when chrono understands America/Pacific etc.

I think the format pattern is the right place to specify this, since it's a property local to that part of an appender.

@troplin
Copy link
Author

troplin commented Apr 27, 2016

Hm, I can't imagine a use case for explicit time zones in logging.
But that may just be my lack of imagination. 😃

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