From b383274680bc616aca433a1c2913da3540b5e007 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Fri, 3 Jan 2025 09:40:34 +0100 Subject: [PATCH] Parse unknown timezones as UTC 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. --- changelog2spec | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog2spec b/changelog2spec index 863ec18a0..539577a5e 100755 --- a/changelog2spec +++ b/changelog2spec @@ -33,6 +33,7 @@ use Time::Zone; use strict; +$ENV{TZ} = "UTC"; my @wday = qw{Sun Mon Tue Wed Thu Fri Sat}; my @mon = qw{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec};