mirror of
https://github.com/curl/curl.git
synced 2026-07-26 14:37:16 +03:00
cd2nroff/manage: use UTC when SOURCE_DATE_EPOCH is set
Make them independent of the TZ setting. Also set a date string like YYYY-MM-DD to avoid a local month name in the date. Reported-by: Carlos Henrique Lima Melara Fixes #13242 Closes #13243
This commit is contained in:
parent
e7caf09c04
commit
afdd112916
2 changed files with 4 additions and 4 deletions
|
|
@ -77,11 +77,11 @@ HELP
|
|||
use POSIX qw(strftime);
|
||||
my @ts;
|
||||
if (defined($ENV{SOURCE_DATE_EPOCH})) {
|
||||
@ts = localtime($ENV{SOURCE_DATE_EPOCH});
|
||||
@ts = gmtime($ENV{SOURCE_DATE_EPOCH});
|
||||
} else {
|
||||
@ts = localtime;
|
||||
}
|
||||
my $date = strftime "%B %d %Y", @ts;
|
||||
my $date = strftime "%Y-%m-%d", @ts;
|
||||
|
||||
sub outseealso {
|
||||
my (@sa) = @_;
|
||||
|
|
|
|||
|
|
@ -50,11 +50,11 @@ my %catlong;
|
|||
use POSIX qw(strftime);
|
||||
my @ts;
|
||||
if (defined($ENV{SOURCE_DATE_EPOCH})) {
|
||||
@ts = localtime($ENV{SOURCE_DATE_EPOCH});
|
||||
@ts = gmtime($ENV{SOURCE_DATE_EPOCH});
|
||||
} else {
|
||||
@ts = localtime;
|
||||
}
|
||||
my $date = strftime "%B %d %Y", @ts;
|
||||
my $date = strftime "%Y-%m-%d", @ts;
|
||||
my $year = strftime "%Y", @ts;
|
||||
my $version = "unknown";
|
||||
my $globals;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue