aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/class.c
diff options
context:
space:
mode:
authorAlexandre Mergnat <[email protected]>2025-04-28 10:06:47 +0000
committerAlexandre Belloni <[email protected]>2025-06-01 22:10:17 +0000
commit7df4cfef8b351fec3156160bedfc7d6d29de4cce (patch)
tree0eb1d01b3ec9dbad8879e690adc99bbfb22d66c8 /drivers/rtc/class.c
parentrtc: pcf8563: fix wrong alarm register (diff)
downloadkernel-7df4cfef8b351fec3156160bedfc7d6d29de4cce.tar.gz
kernel-7df4cfef8b351fec3156160bedfc7d6d29de4cce.zip
rtc: Make rtc_time64_to_tm() support dates before 1970
Conversion of dates before 1970 is still relevant today because these dates are reused on some hardwares to store dates bigger than the maximal date that is representable in the device's native format. This prominently and very soon affects the hardware covered by the rtc-mt6397 driver that can only natively store dates in the interval 1900-01-01 up to 2027-12-31. So to store the date 2028-01-01 00:00:00 to such a device, rtc_time64_to_tm() must do the right thing for time=-2208988800. Signed-off-by: Alexandre Mergnat <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
Diffstat (limited to 'drivers/rtc/class.c')
0 files changed, 0 insertions, 0 deletions