Fix errors in the RTC implementation of month and year

This commit is contained in:
Ry 2022-12-25 22:58:18 -08:00
parent ea53fb151c
commit 82668e10d3

View File

@ -93,11 +93,11 @@ int bus_io_read(void *user, uint32_t *value, uint32_t port) {
struct tm *now = localtime(&rtc_time); struct tm *now = localtime(&rtc_time);
switch (setting) { switch (setting) {
case 0x00: { // year case 0x00: { // year
*value = now->tm_year; *value = now->tm_year + 1900;
break; break;
} }
case 0x01: { // month case 0x01: { // month
*value = now->tm_mon; *value = now->tm_mon + 1;
break; break;
} }
case 0x02: { // day case 0x02: { // day