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

Signed-off-by: Lars Henriksen <LarsHenriksen@xxxxxxxxxx>
---
I just tripped over a similar DST-related bug, this time in April. The whole
calendar is one day off in that month.

 src/ui-calendar.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/ui-calendar.c b/src/ui-calendar.c
index 6d301e6..799d5fd 100644
--- a/src/ui-calendar.c
+++ b/src/ui-calendar.c
@@ -307,6 +307,7 @@ static struct tm get_first_day(unsigned sunday_first)
 	d.dd = 1;
 	t = date2tm(d, 0, 0);
 	mktime(&t);
+	t.tm_isdst = -1;
 	/* get the first day of the week */
 	date_change(&t, 0,
 		    -(sunday_first ?
-- 
2.17.0

Links