mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-01-19 11:30:07 +02:00
[Issue #272] if timezone offset is not specified, treat it as local timezone
This commit is contained in:
parent
6c21833a17
commit
d3425bdc88
@ -1223,8 +1223,10 @@ parse_time(const char *value, time_t *result, bool utc_default)
|
||||
/* determine whether Daylight Saving Time is in effect */
|
||||
tm.tm_isdst = -1;
|
||||
|
||||
/* set timezone to UTC */
|
||||
setenv("TZ", "UTC", 1);
|
||||
/* if tz is not set, treat it as local timezone */
|
||||
if (tz_set)
|
||||
/* set timezone to UTC */
|
||||
setenv("TZ", "UTC", 1);
|
||||
|
||||
/* convert time to utc unix time */
|
||||
*result = mktime(&tm);
|
||||
|
Loading…
x
Reference in New Issue
Block a user