fix: use localzone crate to get local tz

This commit is contained in:
ThetaDev 2025-01-25 21:12:46 +01:00
parent 34f8e9b551
commit 5acbf0e456
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
5 changed files with 5 additions and 67 deletions

View file

@ -2626,7 +2626,7 @@ fn validate_country(country: Country) -> Country {
fn local_tz_offset() -> (String, i16) {
match (
util::local_timezone_name(),
localzone::get_local_zone().ok_or(Error::Other("could not get local timezone".into())),
UtcOffset::current_local_offset().map_err(|_| Error::Other("indeterminate offset".into())),
) {
(Ok(timezone), Ok(offset)) => (timezone, offset.whole_minutes()),