diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-05-09 09:31:44 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-05-09 16:33:21 +0000 |
commit | e7d24c606cdb460e835f7d7553d7b82e1ee11eac (patch) | |
tree | 5f3c88b4e43fa32724e0c2547e402b0907ad38ee /ui/time_shift.c | |
parent | 517e353e7ffe6318afd304d9f4a49d5027d564fd (diff) |
Always explicitly set tm_isdst before calling mktime().
Except in rare cases, we want to set it to -1 so that we let mktime()
determine whether DST/Summer Time was in effect at the given date and
time rather than pretending that we know whether it's in effect or not.
Change-Id: I0ea75317dd308a515cedf4d1260b583e1592cc9b
Reviewed-on: https://code.wireshark.org/review/27431
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/time_shift.c')
-rw-r--r-- | ui/time_shift.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/time_shift.c b/ui/time_shift.c index 74d359f7cf..edd460a5d1 100644 --- a/ui/time_shift.c +++ b/ui/time_shift.c @@ -244,6 +244,7 @@ time_string_to_nstime(const gchar *time_text, nstime_t *packettime, nstime_t *ns tm.tm_hour = h; tm.tm_min = m; tm.tm_sec = (int)floorl(f); + tm.tm_isdst = -1; tt = mktime(&tm); if (tt == -1) { return "Mktime went wrong. Is the time valid?"; |