From d48c17e9e6239f7844dc152bc4b48a911757dec2 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Mon, 18 Jul 2016 17:55:42 +0200 Subject: [PATCH] ignore tm_isdst for FreeBSD closes #125 --- storage.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/storage.c b/storage.c index d56d8b1..8b9258b 100644 --- a/storage.c +++ b/storage.c @@ -732,6 +732,10 @@ static int candidate_line(char *line, void *param) fprintf(stderr, "no strptime on %s", line); return (0); } + tmline.tm_isdst = -1; /* A negative value for tm_isdst causes + * the mktime() function to attempt to + * divine whether summer time is in + * effect for the specified time. */ secs = mktime(&tmline); if (secs <= s_lo || secs >= s_hi) { @@ -763,6 +767,7 @@ static int candidate_line(char *line, void *param) fprintf(stderr, "no strptime on %s", line); return (0); } + tmline.tm_isdst = -1; secs = mktime(&tmline); if (secs <= s_lo || secs >= s_hi) {