Actions
Bug #11518
closeddate test is incorrect
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
date test always fails, as `touch` touches file in local timezone and then we compare file mtime to UTC time.
The fix is trivial
--- a/usr/src/test/util-tests/tests/date/date_test.ksh +++ b/usr/src/test/util-tests/tests/date/date_test.ksh @@ -80,7 +80,7 @@ compare 04120554000 "Mon Sep 7 16:00:00 UTC 1987" UTC # # Test the file related logic # -touch -t 201712042323.23 $TMPDIR/test.$$ +env TZ=UTC touch -t 201712042323.23 $TMPDIR/test.$$ compare "$TMPDIR/test.$$" "Mon Dec 4 23:23:23 UTC 2017" UTC rm -f $TMPDIR/test.$$
Updated by Electric Monk almost 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 213b050a5a57cde3ec36eb74064cec2efb8aa8b2
commit 213b050a5a57cde3ec36eb74064cec2efb8aa8b2 Author: Alexander Pyhalov <apyhalov@gmail.com> Date: 2019-08-05T20:01:21.000Z 11518 date test is incorrect Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: John Levon <levon@movementarian.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions