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

UTC timezone #103

Closed
binaek opened this issue Dec 15, 2021 · 2 comments
Closed

UTC timezone #103

binaek opened this issue Dec 15, 2021 · 2 comments

Comments

@binaek
Copy link
Contributor

binaek commented Dec 15, 2021

Is there any option to log with UTC instead of the location time zone?

I found a time.Now() in https://github.com/hashicorp/go-hclog/blob/master/intlogger.go#L155, but couldn't find anything else

@evanphx
Copy link
Contributor

evanphx commented Dec 15, 2021

There isn't. If you set the TZ env var to UTC when the program starts, then time.Now() should return UTC timestamps.

@binaek binaek changed the title Change default time zone UTC timezone Dec 15, 2021
@binaek
Copy link
Contributor Author

binaek commented Dec 15, 2021

@evanphx Thanks for your quick response. Unfortunately, relying on the TZ env var being set does not work for me.

I raised a PR at #104

Can somebody take a look whether it can be merged in?

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

2 participants