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

Is there a way to avoid passing the UTC offset? #2

Closed
azzamsa opened this issue Oct 17, 2023 · 1 comment
Closed

Is there a way to avoid passing the UTC offset? #2

azzamsa opened this issue Oct 17, 2023 · 1 comment
Labels

Comments

@azzamsa
Copy link
Owner

azzamsa commented Oct 17, 2023

We can obtain the local timezone using the time library, but it's not compatible with async functions. The solution is to utilize tracing-subscriber with its with_timer() method, which is designed to work seamlessly with chrono.

Fortunately, there's already a pull request that addresses this issue, and it has been merged. tokio-rs/tracing#2690

Now, all that's left is to wait for the release.


More context regarding why time doesn't work with async functions.

@azzamsa
Copy link
Owner Author

azzamsa commented Nov 28, 2023

After a long wait, finally, I can get rid of hardcoded UTC timezone in env files, thanks to the new chrono support in tracing-subscriber.

Fixed in this commit 69a4ec8

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

No branches or pull requests

1 participant