summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-02-12 12:29:09 -0500
committerTavian Barnes <tavianator@tavianator.com>2020-02-12 12:29:09 -0500
commit3bfdb184465da7684265b7b21a2c7f0ba5904998 (patch)
tree696aa1437c0cd97199ad4fa4a246e2e218ffc517 /parse.c
parent2bdd2d12801eada77945d4f6644248cf7952cc64 (diff)
downloadbfs-3bfdb184465da7684265b7b21a2c7f0ba5904998.tar.xz
parse: Set tm_isdst to -1
This is required by POSIX to ensure the mktime() determines itself whether DST is in effect.
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 16d0c96..30ed320 100644
--- a/parse.c
+++ b/parse.c
@@ -1658,7 +1658,9 @@ static int parse_reftime_part(const struct parser_state *state, const char **str
/** Parse an explicit reference time. */
static int parse_reftime(const struct parser_state *state, struct expr *expr) {
const char *str = expr->sdata;
- struct tm tm = {0};
+ struct tm tm = {
+ .tm_isdst = -1,
+ };
int tz_hour = 0;
int tz_min = 0;