Bug 9867 - no 12 hour clock or am/pm
Summary: no 12 hour clock or am/pm
Status: RESOLVED DUPLICATE of bug 3768
Alias: None
Product: glibc
Classification: Unclassified
Component: localedata (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: GNU C Library Locale Maintainers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-19 08:07 UTC by alan Beaven
Modified: 2014-07-01 20:50 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alan Beaven 2009-02-19 08:07:08 UTC
for a few years now there has been no 12 hour clock in gnome, i have tracked it
down to glibc with a few fixs kicking around the net, to me this isnt right it
should of been fixed by now, so i am filling this bug report in.

i have put much in as i cant see you needing much info as it is there in glibc
2.7+ and on all systems i use.
Comment 1 Petr Baudis 2009-02-19 09:43:40 UTC
strftime() with exactly what format string in exactly what locale should have
exactly how different output from what it has now?
Comment 2 alan Beaven 2009-02-19 09:48:39 UTC
(In reply to comment #1)
> strftime() with exactly what format string in exactly what locale should have
> exactly how different output from what it has now?

well it should look some thing like 1:43pm i think thats what you want, sorry
kind of new to bug report things, this is for en_GB
Comment 3 Petr Baudis 2009-02-19 10:37:06 UTC
Sorry, it's not clear what "it" is - that depends on exactly what locale
information GNOME uses to decide on whether to show 12-hour or 24-hour clock.
Please ask GNOME developers about that - we need exact langinfo field or
strftime format specifier name.
Comment 4 alan Beaven 2009-02-19 10:43:27 UTC
(In reply to comment #3)
> Sorry, it's not clear what "it" is - that depends on exactly what locale
> information GNOME uses to decide on whether to show 12-hour or 24-hour clock.
> Please ask GNOME developers about that - we need exact langinfo field or
> strftime format specifier name.

it is glibc, or so all the information i have got tells me, it is in
/usr/share/i18n/locale/en_GB, i just add: 

%
% Strings for AM/PM
%
am_pm   "<U0041><U004D>";"<U0050><U004D>"
%
% Appropriate AM/PM time representation (%r)
%       "%l:%M:%S %p"
t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U0070>"
 date_fmt	"<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
 <U0025><U005A><U0020><U0025><U0059>"
 
And Gnome uses the 12 hour clock then.
Comment 5 alan Beaven 2009-02-21 00:18:03 UTC
ok, been playing about as i just found out this prob is not on my home server
and looked to find out why, and i kind of have, if i do locale on my server i get:

nullsleep nullsleep # locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
nullsleep nullsleep # date +"%p"
AM
nullsleep nullsleep #

on every thing else i get:

localhost nullsleep # locale
LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=
localhost nullsleep # date +"%p"
localhost nullsleep # 

I hope this helps?
Comment 6 Petr Baudis 2009-03-29 12:17:39 UTC
If GNOME does not give you the option to use 12-hour clock at all, I would say
that's a GNOME bug; I would say it should only adjust defaults according to the
locale information.

We already have a bug for en_GB having or not having ampm info.

*** This bug has been marked as a duplicate of 3768 ***