diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-03-26 10:57:50 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-03-26 10:57:50 +0000 |
commit | 3271b347fce3b6172323fdb392687ec838cd920d (patch) | |
tree | 17af3ed5482d16256069d40de11f921efbfb95e6 /toolchain | |
parent | d5234a74b610795ac899a8f4fc2648d2ee1745e5 (diff) | |
download | mtk-20170518-3271b347fce3b6172323fdb392687ec838cd920d.zip mtk-20170518-3271b347fce3b6172323fdb392687ec838cd920d.tar.gz mtk-20170518-3271b347fce3b6172323fdb392687ec838cd920d.tar.bz2 |
backport upstream fix for dst computation
SVN-Revision: 31073
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/uClibc/patches-0.9.32/970-dst_leap_months_fix.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/toolchain/uClibc/patches-0.9.32/970-dst_leap_months_fix.patch b/toolchain/uClibc/patches-0.9.32/970-dst_leap_months_fix.patch new file mode 100644 index 0000000..1a4d47b --- /dev/null +++ b/toolchain/uClibc/patches-0.9.32/970-dst_leap_months_fix.patch @@ -0,0 +1,28 @@ +From: Guillaume Bourcier <guillaumebourcier@...> + +The algorithm computing daylight saving time incorrectly adds a day for +each month after January for leap years. The clock shift from/to DST can +be delayed if the last Sunday of a transition month is exactly seven +days before the first of the following month. + +This change adds a day for the February month only. + +Signed-off-by: Guillaume Bourcier <guillaumebourcier@...> +Signed-off-by: Richard Braun <rbraun@...> +--- + libc/misc/time/time.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c +index 19d68e1..8e2ebf1 100644 +--- a/libc/misc/time/time.c 2012-03-26 09:55:20.741069297 +0200 ++++ b/libc/misc/time/time.c 2012-03-26 09:55:57.369068289 +0200 +@@ -705,7 +705,7 @@ + ++day; + } + monlen = 31 + day_cor[r->month -1] - day_cor[r->month]; +- if (isleap && (r->month > 1)) { ++ if (isleap && (r->month == 2)) { + ++monlen; + } + /* Wweekday (0 is Sunday) of 1st of the month |