This is the mail archive of the
mailing list for the glibc project.
Re: am_pm question
- To: jakub at redhat dot com
- Subject: Re: am_pm question
- From: Paul Eggert <eggert at twinsun dot com>
- Date: Tue, 22 May 2001 11:23:17 -0700 (PDT)
- CC: libc-alpha at sources dot redhat dot com
- References: <20010522185117.A642@sunsite.ms.mff.cuni.cz>
> Date: Tue, 22 May 2001 18:51:17 +0200
> From: Jakub Jelinek <email@example.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.).