chore: unset tz env in test (#6984)

chore/unset-tz-env-in-test:
 ### Commit Message

 Add environment variable cleanup in timezone tests

 - Updated `timezone.rs` to include removal of the `TZ` environment variable in the `test_from_tz_string` function to ensure a clean test environment.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
This commit is contained in:
Lei, HUANG
2025-09-17 16:48:38 +08:00
committed by GitHub
parent 14550429e9
commit edf4b3f7f8

View File

@@ -173,6 +173,9 @@ mod tests {
#[test]
fn test_from_tz_string() {
unsafe {
std::env::remove_var("TZ");
}
assert_eq!(
Timezone::Named(Tz::UTC),
Timezone::from_tz_string("SYSTEM").unwrap()