You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
We can obtain the local timezone using the
time
library, but it's not compatible withasync
functions. The solution is to utilizetracing-subscriber
with itswith_timer()
method, which is designed to work seamlessly withchrono
.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 withasync
functions.now_local
works incargo run
but failed incargo test
time-rs/time#538 (comment)threads-required
working nextest-rs/nextest#715 (comment)The text was updated successfully, but these errors were encountered: