]> git.baikalelectronics.ru Git - uboot.git/commit
drivers: rtc: correctly convert seconds to time structure
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 1 Dec 2018 22:14:10 +0000 (23:14 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 1 Dec 2018 23:03:14 +0000 (18:03 -0500)
commit08df080e20bfd54d68341a768e3818059e159a4c
tree222547f2a356f4d7cba9ae401101a3635cf62583
parent047c268a3302a776238d92c2980182cae6055c7b
drivers: rtc: correctly convert seconds to time structure

Variable 'days' must be defined as signed int. Otherwise the conversion
fails for some dates, e.g. 2004-08-25. Cf function rtc_time64_to_tm() in
the Linux kernel source.

Fixes: 124ba82d325c "drivers: rtc: resolve year 2038 problem in rtc_to_tm"
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/rtc/rtc-lib.c