summaryrefslogtreecommitdiff
path: root/firmware/drivers/rtc/rtc_as3514.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/rtc/rtc_as3514.c')
-rw-r--r--firmware/drivers/rtc/rtc_as3514.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/drivers/rtc/rtc_as3514.c b/firmware/drivers/rtc/rtc_as3514.c
index 159a0456a3..43368d2dd1 100644
--- a/firmware/drivers/rtc/rtc_as3514.c
+++ b/firmware/drivers/rtc/rtc_as3514.c
@@ -149,7 +149,7 @@ int rtc_write_datetime(const struct tm *tm)
}
/* Number of days in years gone by since 1-Jan-1980 */
- year_days = 365*(tm->tm_year+20) + (tm->tm_year-1)/4 + 6;
+ year_days = 365*(tm->tm_year-100+20) + (tm->tm_year-100-1)/4 + 6;
/* Convert to seconds since 1-Jan-1980 */
seconds = tm->tm_sec