Subject: port-arm32/9129: resettod() on arm32 does not print year2000 properly
To: None <gnats-bugs@gnats.netbsd.org>
From: None <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 01/08/2000 03:18:08
>Number: 9129
>Category: port-arm32
>Synopsis: resettod() on arm32 does not print year2000 properly
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-arm32-maintainer (NetBSD/arm32 Portmaster)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 6 06:50:59 2000
>Last-Modified:
>Originator: Izumi Tsutsui
>Organization:
Izumi Tsutsui Himeji City, JAPAN
>Release: NetBSD-current 1.4P 19991221
>Environment:
System: NetBSD 1.4P on CATS
>Description:
resettod() on arm32 does not print year 2000 (and year xx0x) properly.
>How-To-Repeat:
Set date, then the kernel says:
resettod: 6/1/200 12:7:55
>Fix:
--- arm32/dev/todclock.c.orig Thu Jan 6 23:33:57 2000
+++ arm32/dev/todclock.c Thu Jan 6 23:35:51 2000
@@ -243,7 +243,7 @@
rtc.rtc_centi =
rtc.rtc_micro = 0;
- printf("resettod: %d/%d/%d%d %d:%d:%d\n", rtc.rtc_day,
+ printf("resettod: %02d/%02d/%02d%02d %02d:%02d:%02d\n", rtc.rtc_day,
rtc.rtc_mon, rtc.rtc_cen, rtc.rtc_year, rtc.rtc_hour,
rtc.rtc_min, rtc.rtc_sec);
>Audit-Trail:
>Unformatted: