summaryrefslogtreecommitdiff
path: root/keyword.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-07-30 14:11:36 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-07-30 14:11:36 -0300
commit4b76d921e6a1c576ed063d465725f0e8770ecbdd (patch)
treeb83c99e1bacf487235b7e2b3075d630ad9f08846 /keyword.c
parentb9c6c96f800cfcc73d5767d66ffdfe235d5865ff (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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/keyword.c b/keyword.c
index dffd422..d7bd550 100644
--- a/keyword.c
+++ b/keyword.c
@@ -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;