diff --git a/util/mkbuildinf.pl b/util/mkbuildinf.pl index 1c273872be11c..7b1aba054ccc9 100755 --- a/util/mkbuildinf.pl +++ b/util/mkbuildinf.pl @@ -12,7 +12,9 @@ my ($cflags, $platform) = @ARGV; $cflags = "compiler: $cflags"; -my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} || time()) . " UTC"; +# Use the value of the envvar SOURCE_DATE_EPOCH, even if it's +# zero or the empty string. +my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} // time()) . " UTC"; print <<"END_OUTPUT"; /*