-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Implement task-safe platform-indepent timezones #10480
Comments
The time module has moved to a separate repo https://github.com/rust-lang/time Should this Issue be moved there or is this an internal rustc component? |
Yes, it's moved to time crate. ( |
Can this be closed then? |
At best, this would be an RFC issue anyway. |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Mar 24, 2023
New lint to detect `&std::path::MAIN_SEPARATOR.to_string()` Fixes rust-lang#10480 changelog: [`manual_main_separator_str`] new lint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar to #10463,
extern::time::at()
(which internally useslocaltime()
) currently depends on "TZ" environment variable, which causessetenv
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)unsafe fn get_env_tz() -> Timezone
.I think this overlaps datetime design a bit, but anyway current implementation is "unsafe".
The text was updated successfully, but these errors were encountered: