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 580945 - Clock should be configurable
Clock should be configurable
Status: RESOLVED DUPLICATE of bug 600276
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-04-30 21:41 UTC by Igor Vatavuk
Modified: 2010-05-09 01:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug 580945 - Have clock respect 12/24 hour clock panel prefs (4.60 KB, patch)
2009-08-10 04:47 UTC, Colin Walters
needs-work Details | Review
Makes the clock format configurable (1.94 KB, patch)
2009-10-28 16:02 UTC, Carlos Martín Nieto
needs-work Details | Review
Detect whether the clock should be displayed in 12h or 24h format (893 bytes, patch)
2009-11-06 23:01 UTC, res
committed Details | Review

Description Igor Vatavuk 2009-04-30 21:41:58 UTC
In my country we use 24 hour time format, but the clock ignores the locale settings and it shows 12h time format and it's without any AM/PM flags.
Comment 1 Stefan Ebner 2009-05-10 11:18:55 UTC
I'm seeing this issue as well
Comment 2 Colin Walters 2009-08-10 04:47:09 UTC
Created attachment 140298 [details] [review]
Bug 580945 - Have clock respect 12/24 hour clock panel prefs

Load the panel prefs; realistically we depend on gnome-panel installed
for a non-composited fallback.
Comment 3 Siegfried Gevatter (RainCT) 2009-08-10 12:46:52 UTC
Here the key is called /apps/panel/applets/clock_screen0 instead of /apps/panel/applets/clock, so this has no visible effect.

Looks good to me otherwise, except that «this._customFormatKey = this._customFormatKey + '/custom_format';x should probably be «this._customFormatKey = this._formatKey + '/custom_format';», and that maybe it should connect to that key too.
Comment 4 Owen Taylor 2009-08-10 14:20:56 UTC
I think the problem with the clock GConf configuration being special with the schema bound to some directory is pretty fundamental.

That is, relying on gnome-panel being installed is OK(-ish) but relying on the user having run gnome-panel and gnome-panel having done magic to bind the clock applet schema into the applets/ subdir isn't.

We could use:

 dgettext("gnome-panel", "24-hour");

to get the default value for the current locale, once the gettext module in gjs lands. Or once the gettext module in gjs lands we could just add our own translatable key for this and avoid the gnome-panel dependency.
Comment 5 Sebastian Rittau 2009-10-10 21:07:53 UTC
Commit ca51a8c926be8e0c268ba3d87dcde5411df630f2 fixes this bug by just marking the clock format as translatable.
Comment 6 Carlos Martín Nieto 2009-10-28 16:02:12 UTC
Created attachment 146430 [details] [review]
Makes the clock format configurable

This patch to current master implements changing the clock format with a GConf key "clock/format". The idea is for the config app to change this key.

The patch needs a bit of work (at least take out the magic string "clock/format") and could be merged into the other proposed patch. This is in order not to depend on the gnome-panel clock applet to set the format for us.
Comment 7 res 2009-11-06 23:01:25 UTC
Created attachment 147135 [details] [review]
Detect whether the clock should be displayed in 12h or 24h format

This patch 'detects' whether the clock should be displayed in 12h or 24h format by looking at the am/pm string: if it's empty display a 24h clock.

AFAIK the gnome-panel clock uses the same trick.

Note that making the time format translatable may not be sufficient: this time format bound to LC_MESSAGES, while it really depends on LC_TIME. For example, I have set LC_MESSAGES to 'en', but LC_TIME to 'de', and I'd expect time to displayed in 24h format (as customary in the 'de' locale), not 12h (as it would be in the 'en' locale).
Comment 8 Greg K Nicholson 2009-11-07 16:02:54 UTC
(In reply to comment #7)
> 12h (as it would be in the 'en' locale).

That would depend on which “en” you mean: en-GB should be 24-hour; perhaps en-US and some others would be 12-hour.
Comment 9 Carlos Martín Nieto 2009-12-01 18:00:07 UTC
Well, even in es_ES, some people use 12-hour and some use 24-hour clocks. What is being done is fine as a sane default, but we still need a way to configure the clock (I want to have the day of the month, for example).

Is there some sort of general concensus on how this should be made?

 And BTW, on the calendar, Sunday still comes out as the first day of the week, instead of Monday (as mandated by my LC_TIME=es_ES.UTF-8 locale.
Comment 10 Gustavo Noronha (kov) 2009-12-11 19:30:36 UTC
FWIW, I got a patch from a Debian user in a bug report, as well, though I think you guys have got what it does covered already: http://bugs.debian.org/558198
Comment 11 Colin Walters 2010-02-11 18:52:50 UTC
Review of attachment 147135 [details] [review]:

Sorry about this patch falling through the cracks!  I think we want this configurable in some way in the future via GConf but for now this patch looks like a decent incremental fix.
Comment 12 Colin Walters 2010-02-11 19:07:36 UTC
Retitling this bug, I think consensus was we wanted a way to make the clock configurable in general via GConf.
Comment 13 Florian Müllner 2010-03-01 21:35:45 UTC
Comment on attachment 147135 [details] [review]
Detect whether the clock should be displayed in 12h or 24h format

Attachment 147135 [details] was pushed a while ago as c21e692652a95.
Comment 14 Florian Müllner 2010-05-09 01:14:47 UTC
(In reply to comment #12)
> Retitling this bug, I think consensus was we wanted a way to make the clock
> configurable in general via GConf.

Fixed in master.

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