You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This duration, 40 weeks, serves to demonstrate that the actual
versus expected value disagreement of 1 hour is due to DST
adjustments. Even where DST is observed, adjustments would
ordinarily have been done twice in 40 weeks. So this case should
not fail, even when the 20 weeks case does.
However, the test remains imperfect, even assuming it is run with
the time zone set to local time and in a place where DST adustments
are made, because there will sometimes never have been exactly one
DST adjustment in any of the last 2, 20, or 40 weeks.
Better temporal coverage should probably be put in place, but
something like the 40 weeks case might still make sense to keep in,
so that we are more likely to catch a possible variant of GitoxideLabs#1696
where the time zone rules had at one time had daylight savings but
were changed to no longer have it (or vice versa). It's possible
that GitoxideLabs#1696 might be fixed by a change to the tested code, or to the
test, while still leaving such a variant in place.
Failure, when it occurs, now looks like:
--- STDERR: gix-date::date time::parse::relative::various ---
thread 'time::parse::relative::various' panicked at gix-date\tests\time\parse.rs:211:9:
assertion `left == right` failed: relative times differ
left: [2024-11-08T21:14:45Z, 2024-11-08T21:14:45Z, 2024-07-05T21:14:45Z, 2024-07-05T21:14:45Z, 2024-02-16T21:14:45Z, 2024-02-16T21:14:45Z]
right: [2024-11-08T21:14:45Z, 2024-11-08T21:14:45Z, 2024-07-05T20:14:45Z, 2024-07-05T21:14:45Z, 2024-02-16T21:14:45Z, 2024-02-16T21:14:45Z]
0 commit comments