diff options
author | Elliott Hughes <enh@google.com> | 2019-03-12 18:00:26 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-03-13 18:03:41 -0500 |
commit | 7aa276db3c0f6e335914401f961d6e76587b141b (patch) | |
tree | 64c23c1765052d2e0bb09fad7a8ac9878523f0af /toys/posix/id.c | |
parent | 1c17ba88c7f12166035f158e8733c053441e6413 (diff) | |
download | toybox-7aa276db3c0f6e335914401f961d6e76587b141b.tar.gz |
date: fix various time zone/daylight time issues.
Sunday's transition in the US broke a bunch of the tests. Worse, it
broke some of the QA folks' scripts. Finally, the boil that is date's
handling of time zones and daylight time has come to a head...
This patch fixes the newly-failing tests *and* the other tests that were
checked in failing to serve as TODOs.
I've resolved the test TODOs about whether implied year/century in POSIX
format should mean the current year or 1900 in favor of the current
year. Both busybox and coreutils agree, and Rob fixed the code recently
so toybox agrees too, but without fixing the tests.
I've switched tests from Europe/London to Europe/Berlin to avoid
disagreements between C libraries about whether to say "GMT" or "UTC"
when daylight savings is not in force.
The majority of this patch implements what I'd been unsuccessfully
trying to explain on the list: that to correctly implement the distinct
input and output time zones (as demonstrated in the three failing tests
we've been carrying around for a while), we should switch to working
with time_t internally rather than struct tm. I've also added the code
to temporarily switch to the input time zone (and back again).
All the tests now pass.
Diffstat (limited to 'toys/posix/id.c')
0 files changed, 0 insertions, 0 deletions