NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/40337: Proposed localized change to w(1)/uptime(1)



>Number:         40337
>Category:       bin
>Synopsis:       Proposed localized change to w(1)/uptime(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 07 16:20:00 +0000 2009
>Originator:     Matthew Mondor
>Release:        netbsd-5, -current (5.99.x)
>Organization:
>Environment:
>Description:
w/uptime uses a custom time output function using strftime(3) %l and %p rather 
than %X which should output better localized time.  Unless there is an output 
standard uptime/w must abide to (I do not think so), I propose the following 
minor fix.

>How-To-Repeat:

>Fix:
--- ./w.c.orig  2009-01-07 11:09:11.000000000 -0500
+++ w.c 2009-01-07 11:10:49.000000000 -0500
@@ -492,7 +492,7 @@
         * SCCS forces the string manipulation below, as it replaces
         * %, M, and % in a character string with the file name.
         */
-       (void)strftime(buf, sizeof(buf), "%l:%" "M%p", localtime(nowp));
+       (void)strftime(buf, sizeof(buf), "%X", localtime(nowp));
        buf[sizeof(buf) - 1] = '\0';
        (void)printf("%s ", buf);



Home | Main Index | Thread Index | Old Index