Fix unit tests that are sensitive to timezone changes.

Review Request #11263 — Created Nov. 4, 2020 and submitted

Information

Review Board
release-4.0.x

Reviewers

We had some user profile unit tests that assumed US/Pacific would map to
-0700. The Daylight Savings switch broke these tests, not surprisingly.

This change calculates what the correct timezone offset should be, based
on whether we're in Daylight Savings or not, and then checks for that in
the calculated payload.

Important caveat: This may break in the future if California separates
from the continent and floats into the ocean.

Unit tests pass.

Summary ID
Fix unit tests that are sensitive to timezone changes.
We had some user profile unit tests that assumed US/Pacific would map to -0700. The Daylight Savings switch broke these tests, not surprisingly. This change calculates what the correct timezone offset should be, based on whether we're in Daylight Savings or not, and then checks for that in the calculated payload. Important caveat: This may break in the future if California separates from the continent and floats into the ocean.
94b4ad2c162e6fd972f225afbaf4c2c11edfcb6e
hailan
  1. Nice. And I love the funny description (also searched it up to see if it's true).
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (0d4fbb9)
Loading...