runners/datetime: How to handle finding standard vs daylight saving time?
The following discussion from !361 (closed) should be addressed:
-
@nclarius started a discussion: (+1 comment) Ah, it's because Pacific Standard Time (the other result that's supposed to be found for "PST") is only in effect from November to March, the rest of the year it's daylight saving time ("PDT") so that's why now suddenly it doesn't find it anymore. There's already a fixme comment in the runner code about this but I failed to realize the issue also applies to Pacific Time when writing the tests.
I see several possible solutions:
- I take back my comment about reverting your change, and we keep the test case as-is, or remove it altogether. We already have the Brazil case in place to check that several matches in the same name category will be shown
- We set the system clock in the tests to some controlled time, so the matches would be produced independently of when the tests are run - if this is technically possible
- We check for matches of the time zone name at several time points and not just now, perhaps 1st of January and 1st of July of the same year, so the runner would always find both winter and summer time, and then show the name and time for the currently active variant; eg "PST" during summer would find and show PDT
Edited by Natalie Clarius