Replies: 2 comments 1 reply
-
Yeah, tzdb support is a completely separate issue than
It's worth noting that |
Beta Was this translation helpful? Give feedback.
-
So at the moment unless stdlib provides a solution to run under ENV_LOCK held, restructuring the function to be env-thread-safe seems unlikely, or there may be some other possibility than |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I'd like to discuss the possibility to bring back
time::UtcOffset::local_offset_at()
on *nix without implementing tzdb support.Does the culprit is only the usage of
tzset()
function or also the use oflocaltime_r()
function (also marked in glibc as MT-Safe env locale)?Assuming we'll lose the possibility to change the timezone at program runtime, would it be necessary to call
tzset()
on eachtime::OffsetDateTime::now_local()
invocation? Then thetzset()
call can be handed to the programmer, before the threads spawn.Then comes the concern about
localtime_r()
which by nature shouldn't modify the environment, but can it be unsound due to other threads modifying the environment?Beta Was this translation helpful? Give feedback.
All reactions