Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a1614796 authored by Jamie Lenehan's avatar Jamie Lenehan Committed by Paul Mundt
Browse files

rtc: rtc-sh: fix rtc for out-by-one for the month.



The RMONCNT register, which holds the month in the RTC, takes a value
between 1 and 12 while the tm_mon field in the time structures takes
a value between 0 and 11. This wasn't being taken into account in
rtc-sh resulting in the month being out by one.

eg, on my board during boot the RTC is set to:

  RTC is set to Thu Jul 01 09:00:00 1999

but "hwclock -r" immediately after logging in was showing:

  Sun Aug  1 09:01:43 1999  0.000000 seconds

Signed-off-by: default avatarJamie Lenehan <lenehan@twibble.org>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 55eec11a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment