Skip to content

Commit fd54fad

Browse files
authored
Parse unknown timezones as UTC (openSUSE#1047)
Without this change, parsing changelog entries such as Tue Mar 28 07:25:39 WEST 2017 - someone@suse would produce a Mar 27 date in the .spec file, because TZ=CET perl -e 'use Date::Parse; print str2time("28 Mar 2017")' 1490652000 considers the local timezone and maps to date -d @1490652000 -u -Iseconds 2017-03-27T22:00:00+00:00 This patch was done while working on reproducible builds for openSUSE.
1 parent b4ce84e commit fd54fad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

changelog2spec

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ use Time::Zone;
3333

3434
use strict;
3535

36+
$ENV{TZ} = "UTC";
3637
my @wday = qw{Sun Mon Tue Wed Thu Fri Sat};
3738
my @mon = qw{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec};
3839

0 commit comments

Comments
 (0)