Skip to content

Support for localtime_r #1395

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

Closed
WhyNotHugo opened this issue Mar 7, 2025 · 2 comments
Closed

Support for localtime_r #1395

WhyNotHugo opened this issue Mar 7, 2025 · 2 comments

Comments

@WhyNotHugo
Copy link

Would be great to have support for localtime_r.

@WhyNotHugo
Copy link
Author

libc::localtime_r is effectively broken and unusable due to outdated definitions for time_t. See: rust-lang/libc#4307

@sunfishcode
Copy link
Member

rustix is scoped to syscall-like functions, and localtime_r is a higher-level function, so this is out of scope for rustix.

The tz-rs crate contains an implementation of localtime_r functionality, which you may find useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants