local_offset_at on Linux multi-threaded #567
Replies: 1 comment 2 replies
-
The key part of the comment is this:
Because With regard to |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently
local_offset_at
does not work on Linux multi-threaded programs, as explained here:time/time/src/sys/local_offset_at/unix.rs
Lines 31 to 33 in fadac54
It seems that
std::env::set_var
is the problem, but which code intimestamp_to_tm
callsstd::env::set_var
? Or is it referring to the C function ofset_var
?Also: The POSIX doc seems to say
localtime_r
can provide the transformation and is thread-safe. But we still calltzset()
. In what cases willlocaltime_r
return incorrect info if we don't calltzset()
explicitly?Beta Was this translation helpful? Give feedback.
All reactions