summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-08-30 23:02:28 +0200
committerJim Meyering <meyering@redhat.com>2011-08-31 20:00:19 +0200
commitdf9cd0a426a9b52ddfcd1c17e368a89fa3c6fbde (patch)
treeaa037377f35247ecd739bef2a788654438947d05 /tests/misc
parent683ee76ad23371a3fc0543ab35445f237820572c (diff)
downloadcoreutils-df9cd0a426a9b52ddfcd1c17e368a89fa3c6fbde.tar.xz
date: support parsing of ISO-8601-with-"T" dates
Thanks to an improvement in gnulib's parse-datetime module, commands like this now succeed (output manually indented): $ ./date -u -d 2004-02-29T16:21:42.33+07:00 +%FT%T.%N%z 2004-02-29T09:21:42.330000000+0000 * tests/misc/date: Add a test to exercise the new-in-gnulib parsing of ISO8601-with-"T" dates. * NEWS (New features): Mention it. * gnulib: Update, to pull in this parse-datetime improvement.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/date3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/misc/date b/tests/misc/date
index dd72544c1..6f7a530b0 100755
--- a/tests/misc/date
+++ b/tests/misc/date
@@ -29,6 +29,7 @@ $ENV{TZ} = 'UTC0';
my $t0 = '08:17:48';
my $d0 = '1997-01-19';
my $d1 = "$d0 $t0 +0";
+my $dT = "${d0}T$t0+0"; # ISO 8601 with "T" separator
my $ts = '08:17:49'; # next second
my $tm = '08:18:48'; # next minute
@@ -72,6 +73,8 @@ my @Tests =
# ['2', "-d '$d1' +'%c'", {OUT=>"Sun Jan 19 $t0 1997"}],
['3', "-d '$d1' +'%d_%D_%e_%h_%H'", {OUT=>"19_01/19/97_19_Jan_08"}],
+ ['3T',"-d '$dT' +'%d_%D_%e_%h_%H'", {OUT=>"19_01/19/97_19_Jan_08"}],
+
['4', "-d '$d1' +'%I_%j_%k_%l_%m'", {OUT=>"08_019_ 8_ 8_01"}],
['5', "-d '$d1' +'%M_%n_%p_%r'", {OUT=>"17_\n_AM_$t0 AM"}],
['6', "-d '$d1' +'%s_%S_%t_%T'", {OUT=>"853661868_48_\t_$t0"}],