diff --git a/utils/env_preferences/src/apple.rs b/utils/env_preferences/src/apple.rs index c3df73586cf..838939f8836 100644 --- a/utils/env_preferences/src/apple.rs +++ b/utils/env_preferences/src/apple.rs @@ -152,7 +152,7 @@ pub fn get_system_calendars() -> Result, RetrievalError> { } /// Get the current time zone of the system -pub fn get_system_timezone() -> Result { +pub fn get_system_time_zone() -> Result { // SAFETY: Returns the time zone currently used by the system // Returns an immutable reference to TimeZone object owned by us let timezone = unsafe { timezone::CFTimeZoneCopySystem() }; diff --git a/utils/env_preferences/src/windows.rs b/utils/env_preferences/src/windows.rs index 59522404bf1..a38d052c5d1 100644 --- a/utils/env_preferences/src/windows.rs +++ b/utils/env_preferences/src/windows.rs @@ -36,7 +36,7 @@ pub fn get_system_calendars() -> Result, RetrievalError> { } /// Get the current time zone of the system -pub fn get_system_timezone() -> Result { +pub fn get_system_time_zone() -> Result { let calendar = Globalization::Calendar::new()?; let timezone = calendar.GetTimeZone()?; Ok(timezone.to_string_lossy()) diff --git a/utils/env_preferences/tests/test.rs b/utils/env_preferences/tests/test.rs index 10afaa524b6..54dfc4e84a9 100644 --- a/utils/env_preferences/tests/test.rs +++ b/utils/env_preferences/tests/test.rs @@ -68,7 +68,7 @@ mod linux_tests { #[cfg(target_os = "macos")] #[cfg(test)] mod macos_test { - use env_preferences::{get_locales, get_system_calendars, get_system_timezone}; + use env_preferences::{get_locales, get_system_calendars, get_system_time_zone}; use icu_locale::Locale; #[test] @@ -111,7 +111,7 @@ mod macos_test { #[test] fn test_time_zone() { - let time_zone = get_system_timezone().unwrap(); + let time_zone = get_system_time_zone().unwrap(); assert!(!time_zone.is_empty(), "Couldn't retreive time_zone"); } } @@ -119,7 +119,7 @@ mod macos_test { #[cfg(target_os = "windows")] #[cfg(test)] mod windows_test { - use env_preferences::{get_locales, get_system_calendars, get_system_timezone}; + use env_preferences::{get_locales, get_system_calendars, get_system_time_zone}; use icu_locale::Locale; #[test] @@ -155,7 +155,7 @@ mod windows_test { #[test] fn test_time_zone() { - let time_zone = get_system_timezone().unwrap(); + let time_zone = get_system_time_zone().unwrap(); assert!(!time_zone.is_empty(), "Couldn't retreive time_zone"); assert!(time_zone.is_ascii(), "Invalid TimeZone format"); }