GNOME Bugzilla – Bug 57153
Localize clock applet defaults
Last modified: 2004-12-22 21:47:04 UTC
See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=15395, choose 24h vs AM/PM according to locale. (More or less, use AM/PM only in locales C, POSIX, and en_US)
The bugreport isn't viewable by the public. Here's the original request: As far as I know, it's only the US that uses AM/PM-clock as a standard nowadays. I think the default clock applet on the panel should default to 24h-clock format, as it is probably what most users want. At the very least, it should honor the locale settings in that aspect (LC_TIME), that has a setting for AM/PM use.
so I'll use nl_langinfo(AM_STR) to check if current locale has AM string, and if yes, make 12 hour the default. currently default format is determined from translation, but if program is not translated, it will choose 12 hour, which is wrong. But then, if locale does not define AM/PM strings (i.e. most of them), the whole 12/24 setting does not make sense. what to do then? show AM regardless of locale, or remove this option altogether?
To me the options should be the same regardless of locale, the locale should change only the default. I'm not sure anyone's ever tested it, but in your gconf schema you can in principle put the <default> entry inside the <locale> tag with the short/long description; that way we avoid hardcoding defaults in the C code, which is good. This way things keep working via gconf as expected. I would specify a <locale name="en_US"><default>whatever</default></locale> for am/pm, and have "C" use 24-hour time - that way you don't need a <locale> entry for every language, they will all fall back to "C" - using the C locale is broken anyway.
will be in 1.5.15