diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2022-07-30 14:11:36 -0300 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2022-07-30 14:11:36 -0300 |
commit | 4b76d921e6a1c576ed063d465725f0e8770ecbdd (patch) | |
tree | b83c99e1bacf487235b7e2b3075d630ad9f08846 /keyword.c | |
parent | b9c6c96f800cfcc73d5767d66ffdfe235d5865ff (diff) |
keyword: Make sure `tm_isdst` is negative in `get_keyword_value()`
This needs to be done in order to properly correct for DST.
Diffstat (limited to 'keyword.c')
-rw-r--r-- | keyword.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -27,6 +27,7 @@ keyword_val get_keyword_value(const keyword *key, char *value, int *error) { if (key->time_fmt != NULL) { struct tm tm = {0}; if (strptime(value, key->time_fmt, &tm) != NULL) { + tm.tm_isdst = -1; val.t = mktime(&tm); } else { *error = 3; |