Follow the 'Time Format' (12h/24h) in Greeter's clock

Bug #1639845 reported by Antonio Camargo
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Greeter
New
Undecided
Unassigned

Bug Description

Greeter shows the time in the 12h format even when the 24h format was chosen is the system settings. This creates inconsistency and confusion (as most countries use the 24h format)

Revision history for this message
richo (richo67) wrote :

I looked at the code. In pantheon-greeter there is file TimeLabel.vala where the time label for greeter is made. Following lines clearly indicates that pm/am and 12 hour display is hard coded:

        var time_format = _("%l:%M");
        var meridiem_format = _(" %p");

The format for time see https://valadoc.org/glib-2.0/GLib.DateTime.format.html.
I think the proper code should not contain meridiem_format at all (requires some other changes to remove this label) and only use time_format as follows:

        var time_format = _("%X");

Revision history for this message
richo (richo67) wrote :

I also think that following bug# are about same topic as this one is: 1624217, 1648968

Revision history for this message
richo (richo67) wrote :

I have branch the greeter and build new one with above proposed change. Here is the diff as I do not think I can push my change up.

The result has however one difference from previous it also shows a seconds and not only hours and minutes.

Revision history for this message
richo (richo67) wrote :

Based on bug 1624217 I am trying to adjust formating as well so the time fits into smaller screen. The size for time CSS is in apps.css.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.