Daylight saving time or other than UTC breaks unit tests
peter-quix opened this issue · comments
Tell us about the bug
When timezone is not specified, current timezone is assumed (correctly), but unit tests are hard coded to specific nanosecond values expected. This results in failing tests when the timezine isn't exactly UTC, such as daylight saving time or locations other than those using UTC.
What did you expect to see?
Not failing unit tests
The functionality works as expected, just a unit test issue, but would be still nice to fix in a way that doesn't invalidate the test completely by comparing 2 identical objects.
Maybe fixed value + local PC's offset compared to UTC. So it still compares, but rather than doign something like "A" == "A", it ends up being "A" == "B"-1.