Skip to content

Commit

Permalink
Fix timezone test after daylight savings shift (#1378)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thomcc authored and workingjubilee committed Nov 27, 2023
1 parent 733827a commit 0b0d668
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pgrx-tests/src/tests/datetime_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 0b0d668

Please sign in to comment.