Skip to content

Commit 58772b0

Browse files
committed
runtests: set SOURCE_DATE_EPOCH to fix failing around midnight
To make sure that `managen` called by test 1706 uses the same date as the test expects in the `%DATE` macro. Before this patch when tests started running before UTC midnight and reached test 1706 after, these dates were different and the test failed. Follow-up to 0e73b69 Fixes #14173 Closes #14187
1 parent c21c51d commit 58772b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/runtests.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,9 @@ sub checksystemfeatures {
500500
$versretval = runclient($versioncmd);
501501
$versnoexec = $!;
502502

503-
$DATE = strftime "%Y-%m-%d", localtime;
503+
my $current_time = int(time());
504+
$ENV{'SOURCE_DATE_EPOCH'} = $current_time;
505+
$DATE = strftime "%Y-%m-%d", gmtime($current_time);
504506

505507
open(my $versout, "<", "$curlverout");
506508
@version = <$versout>;

0 commit comments

Comments
 (0)