From 82668e10d3eba1e06da6700275590807151c7651 Mon Sep 17 00:00:00 2001 From: Ry Date: Sun, 25 Dec 2022 22:58:18 -0800 Subject: [PATCH] Fix errors in the RTC implementation of month and year --- src/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bus.c b/src/bus.c index 888d366..7e8ba26 100644 --- a/src/bus.c +++ b/src/bus.c @@ -93,11 +93,11 @@ int bus_io_read(void *user, uint32_t *value, uint32_t port) { struct tm *now = localtime(&rtc_time); switch (setting) { case 0x00: { // year - *value = now->tm_year; + *value = now->tm_year + 1900; break; } case 0x01: { // month - *value = now->tm_mon; + *value = now->tm_mon + 1; break; } case 0x02: { // day