From db26a24f2f0086f0134c53de5d6c748f4d0cb590 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 9 Nov 2016 05:57:05 -0800 Subject: [PATCH] Windows: fix timezone calculation Comparing to daylight-saving time change was performed incorrectly, so that days in the same month as a change and the hour within the day before the switch hour were all treated as pre-switch (instead of counting only days up to the switch as pre-switch). Thanks to Jon Zeppieri for the repair and George Neuner for the report. --- racket/src/racket/src/fun.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/racket/src/racket/src/fun.c b/racket/src/racket/src/fun.c index bf8589cd2a..d5d7a79156 100644 --- a/racket/src/racket/src/fun.c +++ b/racket/src/racket/src/fun.c @@ -9875,6 +9875,8 @@ static int is_day_before(SYSTEMTIME *a, SYSTEMTIME *b) if (a->wDay < doc) return 1; + if (a->wDay > doc) + return 0; dtxCOMP(wHour); dtxCOMP(wMinute);