bug-sysutils
[Top][All Lists]
Advanced

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

Re: [Bug-sysutils] %H:%M


From: Ben Asselstine
Subject: Re: [Bug-sysutils] %H:%M
Date: Sun, 25 Mar 2007 16:29:13 -0400

Isn't %r in the current locale?

From the glibc manual:
   `%r'
         The complete calendar time using the AM/PM format of the
         current locale.

Ben

On 3/25/07, David Weinehall <address@hidden> wrote:
On Sun, Mar 25, 2007 at 03:43:19PM -0400, Ben Asselstine wrote:
> Hello,
>
> There's an item on the TODO list about %H:%M and how it's bad for
> certain locales.
>
> The answer seems to be "%r" which may or may not be defined by the
> locale.  I suggest that we go with %R instead when %r produces 0
> bytes.
>
> %r gives me: `03:40:56 PM'
> %R gives me `15:40'
>
> The wall and write programs need to be fixed wrt this bug.  Does this
> seem like the Right Thing To Do?

%R does not respect the locale, so it doesn't do the right thing either.
What we want is something that will output:

%H<separator>%M<optionally am/pm>

The closest thing there is would be %X, which gives the above, but with
seconds appended as well.  Is %H<sep>%M%p really such an unusual format
for time?!


Regards: David
--
 /) David Weinehall <address@hidden> /) Northern lights wander      (\
//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\)  http://www.acc.umu.se/~tao/    (/   Full colour fire           (/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]