This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: am_pm question


> Date: Tue, 22 May 2001 18:51:17 +0200
> From: Jakub Jelinek <jakub@redhat.com>
> 
> I got a bugreport that en_AU locale does not define AM/PM.
> Anyone knows
> a) if Australia should use 12 or 24 hour time

It depends.  (I've generally found that if I ask two Australians about
time issues, I'll get three different opinions.  :-)

> b) even if date +%c does not use 12 hour time, shouldn't
>    each locale specify %p (AM/PM) strings?

Yes.  I've heard of hosts that define these strings to be empty in
some locales (was it HP-UX? I forget), and POSIX seemingly allows
empty strings there, but it still seems to be incorrect to me, as it
causes POSIX getdate to stop working for %p.

My impression is that %p is needed only because some locales prefer
"AM"/"PM", others prefer "a.m./p.m.", etc.  Perhaps there are some
locales where ordinary usage does not have the notions of AM and PM,
and in which abbreviations like "AM" and "PM" stand for something
entirely different and would therefore be confusing -- but in the
worst case one could simply write out the Latin phrases "ante
meridiem" and "post meridiem" and avoid ambiguity that way.

> Checking what does Solaris:
> a) it uses 24 hour time for Australia like glibc
> b) LC_TIME=en_AU date +%r (and LC_TIME=en_AU date +%p) even
>    then include AM/PM strings

I think this is the typical behavior for Australia (as well as for the
United States, Great Britain, etc.).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]