-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Description
Similar to #10463, extern::time::at()
(which internally uses localtime()
) currently depends on "TZ" environment variable, which causes setenv
race.
Also its interpretation is also platform-dependent: linux libc understands TZ=America/Los_Angeles
but Windows does not. (#10307)
We need:
Timezone
type whose constructor may understand common time zone strings.fn localtime(&self, utc_time) -> Tm
method forTimezone
. (This seems quite hard because it seems that there is no corresponding libc function)- For environment timezone, we may provide
unsafe fn get_env_tz() -> Timezone
.
I think this overlaps datetime design a bit, but anyway current implementation is "unsafe".
Metadata
Metadata
Assignees
Labels
No labels