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
This commit is contained in:
parent
b34333fa02
commit
1a7de551a7
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue