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 time #11

Closed
sebastianwebber opened this issue Feb 2, 2018 · 2 comments
Closed

UTC time #11

sebastianwebber opened this issue Feb 2, 2018 · 2 comments

Comments

@sebastianwebber
Copy link

Hi there!

There is any particular reason to force UTC timestamp?

Regards,
Sebastian

@deankarn
Copy link
Contributor

deankarn commented Feb 2, 2018

@sebastianwebber no, other than logs should be in UTC to avoid time zone and dst issues; but your just converting it to UTC isn’t good enough, the machines time zone must be set accordingly.

I was revamping this library to allow preset values, I’ll remove the explicit UTC conversation at that time :)

@sebastianwebber
Copy link
Author

Hi @joeybloggs,

I do that. I create a custom handler and inside it, i convert the timestamp to a new locale (America/Sao_Paulo in my case).

I use something like this:

b.WriteString(e.Timestamp.In(loc).Format(defaultFormat))

Thanks for your help.

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