Blame SOURCES/9992-lib-Explicitly-do-not-use-DST.patch

929151
From a5fbbd2fca0c8cd2a3c0c9a898dca37addf4b2e0 Mon Sep 17 00:00:00 2001
929151
From: Matej Marusak <mmarusak@redhat.com>
929151
Date: Thu, 6 Dec 2018 11:59:56 +0100
929151
Subject: [PATCH 2/2] lib: Explicitly do not use DST
929151
929151
DST = Daylight Saving Time
929151
Value of this field is not set up by strptime and therefore value
929151
of `tm_isdst` field is undefined. Bacause of this reason, output of
929151
`mktime` may differ +-1 hour.
929151
929151
Signed-off-by: Matej Marusak <mmarusak@redhat.com>
929151
(cherry picked from commit bd7b93d056d780df18b377f5c553611deeff2443)
929151
---
929151
 src/lib/iso_date_string.c | 3 +++
929151
 1 file changed, 3 insertions(+)
929151
929151
diff --git a/src/lib/iso_date_string.c b/src/lib/iso_date_string.c
929151
index ab23f05b..cb887832 100644
929151
--- a/src/lib/iso_date_string.c
929151
+++ b/src/lib/iso_date_string.c
929151
@@ -61,6 +61,9 @@ int iso_date_string_parse(const char *date, time_t *pt)
929151
         return -EINVAL;
929151
     }
929151
 
929151
+    // daylight saving time not in use
929151
+    local.tm_isdst = 0;
929151
+
929151
     *pt = mktime(&local);
929151
     return 0;
929151
 }
929151
-- 
929151
2.21.0
929151