GNOME Bugzilla – Bug 172514
gweather uses wrong time format in en_GB locale
Last modified: 2005-12-07 01:58:39 UTC
Distribution/Version: Debian sarge 1. Wait until the afternoon. 2. Add a weather applet to the panel with a locale of en_GB (it's probably easiest to run the whole GNOME session in this locale). 3. Open Details for the weather applet. 4. Observe that the update time shows a 12-hour time with no a.m./p.m. indicator. The format string used is "%a, %d %b / %l:%M %P" which might be expected to show a 12-hour time with an a.m./p.m. indicator, but actually %P may convert to an empty string - which it does here. I don't understand why gweather localises the time format in this way. Why not leave it to the C library by using something like "%c" or "%x / %X"?
:) Contentious issue you touch on. The people from glibc-locale are adamant that the am_pm variable in the locale settings should only be set if the official time format for the specific locale defines am_pm. Which means that if officially in the UK the time format is 24-hour clock, then by the glibc-locale people the am_pm must not be set. And more importantly, applications should know about this and not allow setting a 12-hour clock. By the way, there is a EU-wide proposal-rule-something that states we use the 24-hour clock. Now, let's hear GNOME's side. The user should be able to choose between a 12-hour or 24-hour clock. Simple. Some background to get you started: 1. Discussion on gnome-i18n http://mail.gnome.org/archives/gnome-i18n/2005-February/msg00013.html 2. Discussion on linux-utf8 http://www.mail-archive.com/linux-utf8@nl.linux.org/msg04996.html
I didn't choose a 24-hour clock. GNOME Weather shows me 12-hour times because that's its default for my locale, even though the glibc maintainers reckon the default here is 24-hour. If the glibc-locale for en_GB is broken, work around it rather than compounding the problem (e.g. use defaults of "am" and "pm" if the locale has blank strings for them), and offer the choice of 12- or 24-hour time display.
Simos: these issues are irrelevant here since they only apply to cases where the user is in a 24hour locale and has manually chosen to have 12hour time. gweather has no such option and as such it should just display the default. Ben: The problem with switching to %c is that it shows way too much information. I don't care to know the year in which the last update occured nor do I care to know about the number of seconds. There is no format string (or even combination of) to show us the amount of information we want. This is definitely bug. Perhaps we should just suck it up and go with '%c'. Confirming. Davyd: thoughts?
My '%c' representation is quite nice. Let's just do it.
OK. Using %c universally in HEAD now. Bug closed.