[bugs] [PATCH] DST: fix date_change()

The tm structure is passed by reference and is overwritten after a succesfull
call of mktime().
---
 src/utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/utils.c b/src/utils.c
index 8a8de75..471c7be 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -529,6 +529,7 @@ int date_change(struct tm *date, int delta_month, int delta_day)
 	if (mktime(&t) == -1) {
 		return 1;
 	} else {
+		t.tm_isdst = -1;
 		*date = t;
 		return 0;
 	}
-- 
2.17.0

Links