This PR adds DST support and Unit Tests to contribute significantly toward a tz v1.0.0 release. It fixes pre-existing issues up to v0.7.0 (@oz) plus it fixes new unreleased regressions in HEAD (@wyne). Until now, tz has never properly supported DST transitions.
This PR includes the following fixes:
Support missing and duplicated DST hours, same as real-world clocks (fix 092a39a, fix #59)
Support dynamic timezone name abbreviations for daylight-saving transitions e.g. CET versus CEST (fix 0bdd6e2, fix #59)
Support correct DST date markers, including for midnight DST changes (fix 01ff381, fix #59)
Support fractional-hour timezone offsets and stable keyboard navigation (fix cb3ba9f, fix #60)
Do not zero out the minutes during keyboard navigation, unless requested by the user (fix cb3ba9f, #60)
Show -list search syntax (fix d6c5408)
Unblock unit tests by making the time and zone properly settable, not dependent on the current time or user environment (fix 0bdd6e2, fix #57)
Extensive unit-test coverage >80% with 95-100% coverage for most files, except main.go (fix #56)
Due to the extensive refactoring of core tz logic, this PR is quite ‘big’ so I’ve sub-divided it into small commits that are more easily reviewable. I’ve added baseline unit test data from v0.7.0, then incrementally updated it to show the impact and necessity of each change.
This PR includes the following new features to make DST clearer:
Show DST start & end markers
Show numerical UTC offset for timezones (z key)
This helps resolve user confusion about timezone names, as the “ST” abbreviation is ambiguous and can either mean “Standard Time” (no daylight saving) or “Summer Time” (with daylight saving).
Show ISO datetime format (f key)
Highlight a particular timezone in the output (j/k keys)
Keyboard navigation to add/subtract one minute at a time (-/+ keys)
This PR depends on first merging PRs #54 and #61 (commits on 9 and 13 October), as they contain pre-requisite fixes as a basis for the functionality and unit-test data/expectations in this PR. Hence I’ve raised this as a Draft for the time being, although it’s ready for review (commits starting 14 October).
This PR adds DST support and Unit Tests to contribute significantly toward a
tz
v1.0.0 release. It fixes pre-existing issues up to v0.7.0 (@oz) plus it fixes new unreleased regressions in HEAD (@wyne). Until now, tz has never properly supported DST transitions.This PR includes the following fixes:
-list
search syntax (fix d6c5408)Due to the extensive refactoring of core tz logic, this PR is quite ‘big’ so I’ve sub-divided it into small commits that are more easily reviewable. I’ve added baseline unit test data from v0.7.0, then incrementally updated it to show the impact and necessity of each change.
This PR includes the following new features to make DST clearer:
z
key)f
key)j
/k
keys)-
/+
keys)This PR depends on first merging PRs #54 and #61 (commits on 9 and 13 October), as they contain pre-requisite fixes as a basis for the functionality and unit-test data/expectations in this PR. Hence I’ve raised this as a Draft for the time being, although it’s ready for review (commits starting 14 October).