From 7f3ed169ccbe506e130ba43c54c327a7844b05c8 Mon Sep 17 00:00:00 2001 From: Patrick Huang Date: Mon, 17 Jun 2024 10:25:02 +0000 Subject: [PATCH] fix UT deprecated methods --- src/common/src/types/datetime.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/src/types/datetime.rs b/src/common/src/types/datetime.rs index 375296cd8b283..bac96b6c1dea5 100644 --- a/src/common/src/types/datetime.rs +++ b/src/common/src/types/datetime.rs @@ -882,10 +882,10 @@ mod tests { Timestamp::from_str("2022-08-03 10:34:02").unwrap() ); let ts = Timestamp::from_str("0001-11-15 07:35:40.999999").unwrap(); - assert_eq!(ts.0.timestamp_micros(), -62108094259000001); + assert_eq!(ts.0.and_utc().timestamp_micros(), -62108094259000001); let ts = Timestamp::from_str("1969-12-31 23:59:59.999999").unwrap(); - assert_eq!(ts.0.timestamp_micros(), -1); + assert_eq!(ts.0.and_utc().timestamp_micros(), -1); // invalid datetime Date::from_str("1999-01-08AA").unwrap_err();