-
Notifications
You must be signed in to change notification settings - Fork 55
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
Is there a way to get system's Tz
#81
Comments
I'd be happy to do a PR to add this functionality to chrono-tz; especially since I also need it. However there's no platform-independent way to do this and I won't have access to a Windows environment for a few of days. On Unix-like the best way is to try each of these and use the first one that gives you a valid timezone identifier
Windows has a C function called |
This is the raison d'etre of let tz_str = iana_time_zone::get_timezone()?;
let tz: chrono_tz::Tz = tz_str.parse()?; |
I think that's a pretty good way to do it, so I'll close this for now. |
No description provided.
The text was updated successfully, but these errors were encountered: