1 From: Guillaume Bourcier <guillaumebourcier@...>
3 The algorithm computing daylight saving time incorrectly adds a day for
4 each month after January for leap years. The clock shift from/to DST can
5 be delayed if the last Sunday of a transition month is exactly seven
6 days before the first of the following month.
8 This change adds a day for the February month only.
10 Signed-off-by: Guillaume Bourcier <guillaumebourcier@...>
11 Signed-off-by: Richard Braun <rbraun@...>
13 libc/misc/time/time.c | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
16 diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
17 index 19d68e1..8e2ebf1 100644
18 --- a/libc/misc/time/time.c 2012-03-26 09:55:20.741069297 +0200
19 +++ b/libc/misc/time/time.c 2012-03-26 09:55:57.369068289 +0200
23 monlen = 31 + day_cor[r->month -1] - day_cor[r->month];
24 - if (isleap && (r->month > 1)) {
25 + if (isleap && (r->month == 2)) {
28 /* Wweekday (0 is Sunday) of 1st of the month