Fixed handling of year in clock device.
h3rald h3rald@h3rald.com
Fri, 13 Feb 2026 07:58:11 +0100
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
devices/clock.c
→
devices/clock.c
@@ -149,7 +149,9 @@
switch (addr) { case CLOCK_YEAR: - return (xyw_byte)((lt->tm_year + 1900) % 100); + return (xyw_byte)((lt->tm_year + 1900) >> 8); + case CLOCK_YEAR + 1: + return (xyw_byte)((lt->tm_year + 1900) & 0xFF); case CLOCK_MONTH: // 1-12 return (xyw_byte)(lt->tm_mon + 1);