summaryrefslogtreecommitdiff
path: root/tests/date
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-07-12 21:56:35 +0000
committerJim Meyering <jim@meyering.net>1997-07-12 21:56:35 +0000
commitb6a57ff354f49e9e12c7952e6ffea0c9cf146097 (patch)
treeeead94a98de7e61549828171c4073d71db0d77bc /tests/date
parent0e6b6d4c5cd2af39944c4b56df8b8eb975445360 (diff)
downloadcoreutils-b6a57ff354f49e9e12c7952e6ffea0c9cf146097.tar.xz
add date2sec and sec2date from the manual
Diffstat (limited to 'tests/date')
-rw-r--r--tests/date/Test.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/date/Test.pm b/tests/date/Test.pm
index e6bad12bb..00813d0fb 100644
--- a/tests/date/Test.pm
+++ b/tests/date/Test.pm
@@ -84,7 +84,11 @@ sub test_vector
['next-y', "-d '$d1 next year' '+%Y-%m-%d %T'", {}, "$dy $t0", 0],
['utc-0', "-u -d '08/01/97 6:00' '+%D,%H:%M'", {}, "08/01/97,10:00", 0],
- ['utc-1', "-d '1970-01-01 00:00:01' '+%s'", {}, "7201", 0],
+ ['utc-1', "-d '1970-01-01 00:00:01' +%s", {}, "7201", 0],
+
+ ['date2sec-0', "-d 2000-01-01 +%s", {}, "946684800", 0],
+ ['sec2date-0', "-d '1970-01-01 UTC 946684800 sec' +'%Y-%m-%d %T %z'", {},
+ "2000-01-01 00:00:00 +0000", 0],
# FIXME: add a lot more...
);