diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-01-20 18:24:02 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-01-20 18:24:54 -0800 |
commit | b14be5085cd1aefd473a000456b21270e6070711 (patch) | |
tree | e15813f9be5eb1de322aac2ccae736ce3d029d22 /tests/misc/date.pl | |
parent | 7cecdd6d69ea6981f93c2f15918c10f2e7af14cd (diff) | |
download | coreutils-b14be5085cd1aefd473a000456b21270e6070711.tar.xz |
date: fix TZ= regression
Problem reported by Paul Wise for Debian, in:
https://bugs.debian.org/851934
This is fallout from the fix for GNU Bug#23035.
* src/date.c (batch_convert): New args TZ and TZSTRING.
All uses changed.
(batch_convert, main): Adjust to parse_datetime2 API change.
(main): Allocate time zone object.
* tests/misc/date-debug.sh: Fix incorrect test case,
caught by the fix.
* tests/misc/date.pl: Test the fix.
Diffstat (limited to 'tests/misc/date.pl')
-rwxr-xr-x | tests/misc/date.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/misc/date.pl b/tests/misc/date.pl index 519c2474d..f026909bf 100755 --- a/tests/misc/date.pl +++ b/tests/misc/date.pl @@ -291,6 +291,12 @@ my @Tests = {ERR => "date: invalid date 'TZ=\"\"\"'\n"}, {EXIT => 1}, ], + + # https://bugs.debian.org/851934#10 + ['cross-TZ-mishandled', "-d 'TZ=\"EST5\" 1970-01-01 00:00'", + {ENV => 'TZ=PST8'}, + {OUT => 'Wed Dec 31 21:00:00 PST 1969'}, + ], ); # Repeat the cross-dst test, using Jan 1, 2005 and every interval from 1..364. |