On 2011-02-24 18:32:30 +0100, Vincent Lefevre wrote: > gdm3 displays the time as "6:28" while we use the 24hr format in > France, so that it should be: "18:28". So, gdm3 should use the time > format specified in the locales (set via /etc/default/locale).
It could also be configurable (as suggested in bug 656161), but the default should be specified by the locales (LC_TIME...), e.g. by using %X. The update_time_format code in gdm-clock-widget.c has different formats, but only one seems to be used in practice. Anyway, there are locales where %p doesn't make sense at all and appears as blank. I've attached a patch that solves the problem on my side (I don't know about the other formats). With it, the seconds are also displayed. That's why the 1-minute timeout is removed, but this timeout was incorrect even when the seconds are not displayed (bug 680020). -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
--- a/gui/simple-greeter/gdm-clock-widget.c 2011-09-04 20:44:17.000000000 +0200 +++ b/gui/simple-greeter/gdm-clock-widget.c 2012-07-03 01:21:40.000000000 +0200 @@ -86,11 +86,7 @@ */ tooltip_format = "%x"; } else { - /* translators: This is the time format to use when there is - * no date, just weekday and time without seconds. - */ - clock_format = _("%a %l:%M %p"); - + clock_format = "%a %X"; tooltip_format = "%x"; } @@ -161,11 +157,6 @@ g_get_current_time (&tv); timeouttime = (G_USEC_PER_SEC - tv.tv_usec) / 1000 + 1; - /* timeout of one minute if we don't care about the seconds */ - if (! clock->priv->should_show_seconds) { - timeouttime += 1000 * (59 - now % 60); - } - clock->priv->update_clock_id = g_timeout_add (timeouttime, (GSourceFunc)update_timeout_cb, clock);