After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 172514 - gweather uses wrong time format in en_GB locale
gweather uses wrong time format in en_GB locale
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: gweather
2.8.x
Other All
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-03 16:16 UTC by Ben Hutchings
Modified: 2005-12-07 01:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8



Description Ben Hutchings 2005-04-03 16:16:02 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"?
Comment 1 Simos Xenitellis 2005-07-28 00:50:12 UTC
:)

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
Comment 2 Ben Hutchings 2005-07-28 23:17:45 UTC
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.
Comment 3 Allison Karlitskaya (desrt) 2005-12-06 18:35:50 UTC
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?
Comment 4 Danielle Madeley 2005-12-07 01:15:20 UTC
My '%c' representation is quite nice.

Let's just do it.
Comment 5 Allison Karlitskaya (desrt) 2005-12-07 01:58:39 UTC
OK.  Using %c universally in HEAD now.  Bug closed.