diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/rtc/rtc_as3514.c | 2 |
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) | |||
149 | } | 149 | } |
150 | 150 | ||
151 | /* Number of days in years gone by since 1-Jan-1980 */ | 151 | /* Number of days in years gone by since 1-Jan-1980 */ |
152 | year_days = 365*(tm->tm_year+20) + (tm->tm_year-1)/4 + 6; | 152 | year_days = 365*(tm->tm_year-100+20) + (tm->tm_year-100-1)/4 + 6; |
153 | 153 | ||
154 | /* Convert to seconds since 1-Jan-1980 */ | 154 | /* Convert to seconds since 1-Jan-1980 */ |
155 | seconds = tm->tm_sec | 155 | seconds = tm->tm_sec |