From: Sylvestre Ledru Date: Sat, 14 Feb 2026 19:08:12 +0000 (+0100) Subject: tests: date: add timezone conversion test X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c6bb37e2f1d190390181a6760631e6c80ca9550;p=thirdparty%2Fcoreutils.git tests: date: add timezone conversion test *tests/date/date.pl: Add the test case. Add test case for https://github.com/uutils/coreutils/issues/10800 to verify `date -u -d '10:30 UTC-05'` converts to 15:30 UTC. --- diff --git a/tests/date/date.pl b/tests/date/date.pl index fabc45fec7..99b3adb415 100755 --- a/tests/date/date.pl +++ b/tests/date/date.pl @@ -368,6 +368,10 @@ my @Tests = ['paren-5', "-d '((nested))2026-01-05' -u +'%Y-%m-%d'", {OUT=>"2026-01-05"}], ['paren-6', "-d '((nested)2026-01-05)' +'%H:%M:%S'", {OUT=>"00:00:00"}], + + # Test timezone conversion with -u -d flag + # "10:30 UTC-05" should convert to "15:30 UTC", not "10:30 UTC" + ['tz-conversion-est', "-u -d '10:30 UTC-05' +'%H:%M'", {OUT=>"15:30"}], ); # Repeat the cross-dst test, using Jan 1, 2005 and every interval from 1..364.