From edf4b3f7f81b134a0aaae5d544e563ed785194f4 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" <6406592+v0y4g3r@users.noreply.github.com> Date: Wed, 17 Sep 2025 16:48:38 +0800 Subject: [PATCH] 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 --- src/common/time/src/timezone.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/time/src/timezone.rs b/src/common/time/src/timezone.rs index b1fefceb21..fec659248f 100644 --- a/src/common/time/src/timezone.rs +++ b/src/common/time/src/timezone.rs @@ -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()