NetBSD-Bugs archive

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

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



The following reply was made to PR bin/40337; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/40337: Proposed localized change to w(1)/uptime(1)
Date: Sat, 14 Feb 2009 22:33:43 +0000

 On Wed, Jan 07, 2009 at 04:20:00PM +0000, mm_lists%pulsar-zone.net@localhost 
wrote:
  > 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.
 
 So, because this changes the default output formatting in a program
 that's fairly often used in scripts, I don't think it's a great idea.
 
 Unfortunately, strftime does not define a "short time" format that
 would naturally produce %l:%M%p in the default locale. Probably it
 should, but we don't really get to decide that.
 
 Maybe a suitable hack would be to teach w which locales want %k:%M
 instead of %l:%M%p? Is there any other alternative formatting that
 anyone might (reasonably) want?
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index