From f4d86a744016890e3a08e9e50616ff4cbae41333 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 30 May 2022 14:24:45 +0300 Subject: Fix changelog parsing affecting caller timezone state We meddle with TZ environ which then propagates to other values through mktime() implicitly calling tzset(), but that other data doesn't get reset by just restoring the TZ variable. Restore initial state by explicitly call tzset() after we're done with it. Fixes: #1821 (cherry picked from commit 1a7de551a74d73f01eb40cb744c1dbba5faeb651) --- build/parseChangelog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/build/parseChangelog.c b/build/parseChangelog.c index 65c0952a6..c59786f25 100644 --- a/build/parseChangelog.c +++ b/build/parseChangelog.c @@ -175,6 +175,7 @@ static int dateToTimet(const char * datestr, time_t * secs, int * date_words) setenv("TZ", tz, 1); free(tz); } + tzset(); if (*secs == -1) goto exit; -- cgit v1.2.1