From 0b0d66801ba1df14228ef52615a07327837e4700 Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Mon, 6 Nov 2023 17:41:49 -0800 Subject: [PATCH] Fix timezone test after daylight savings shift (#1378) This test fails for me locally because the offset is -18000 now. Maybe we should be more specific about the timezone we're asking about, but this seems fine too. --- pgrx-tests/src/tests/datetime_tests.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pgrx-tests/src/tests/datetime_tests.rs b/pgrx-tests/src/tests/datetime_tests.rs index faaa9fc7f..b50d8d2a2 100644 --- a/pgrx-tests/src/tests/datetime_tests.rs +++ b/pgrx-tests/src/tests/datetime_tests.rs @@ -481,8 +481,10 @@ mod tests { } #[pg_test] - fn test_timezone_offset_edt() { - assert_eq!(Ok(-14400), get_timezone_offset("US/Eastern")) + fn test_timezone_offset_us_eastern() { + let offset = get_timezone_offset("US/Eastern"); + // EDT vs EST + assert!(offset == Ok(-14400) || offset == Ok(-18000), "offset was: {offset:?}"); } #[pg_test]