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 745111 - The 24h time format in the world's clocks is reverse in RTL
The 24h time format in the world's clocks is reverse in RTL
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.15.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks: 745132
 
 
Reported: 2015-02-24 18:53 UTC by Yosef Or Boczko
Modified: 2015-03-04 12:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (156.95 KB, image/png)
2015-02-24 18:54 UTC, Yosef Or Boczko
  Details
util: Add formatTime() helper method (5.26 KB, patch)
2015-02-25 22:54 UTC, Florian Müllner
committed Details | Review
Use formatTime() for timestamps (8.51 KB, patch)
2015-02-25 22:54 UTC, Florian Müllner
committed Details | Review
util: Use GLib.DateTime in formatTime() (3.08 KB, patch)
2015-02-25 22:54 UTC, Florian Müllner
committed Details | Review
dateMenu: Use formatTime() for world clock (1.46 KB, patch)
2015-02-25 22:54 UTC, Florian Müllner
committed Details | Review
util: Add createTimeLabel() (1.44 KB, patch)
2015-02-25 22:54 UTC, Florian Müllner
committed Details | Review
Use createTimeLabel() where appropriate (2.40 KB, patch)
2015-02-25 22:54 UTC, Florian Müllner
committed Details | Review

Description Yosef Or Boczko 2015-02-24 18:53:23 UTC
See the screenshot.

The time in the left-bottom side of the calendar is reverse.
Note: the time format in the notif (right-top side) is ok.

I played with the string in the .po file, and nothing :-/
Comment 1 Yosef Or Boczko 2015-02-24 18:54:33 UTC
Created attachment 297802 [details]
Screenshot
Comment 2 Yosef Or Boczko 2015-02-24 20:32:40 UTC
See bug #745120.
Comment 3 Florian Müllner 2015-02-25 22:54:22 UTC
Created attachment 297929 [details] [review]
util: Add formatTime() helper method

Displaying a time is more complex than it appears at first glance:
it should respect the user's choice regarding 12- our 24-hour format (but
only when supported by the locale) and follow the LC_TIME rather than the
LC_MESSAGES setting.
So rather than getting it more or less right in various places, it makes
sense to defer to a helper method which hopefully does the right thing. The
method added by this patch is based on _formatTimestamp in telepathyClient
with some minor tweaks:
 - there's an additional params parameter which allows enforcing
   a time-only format, even on dates other than the current one
 - only a single desktop settings object is created and shared between
   invocations
Comment 4 Florian Müllner 2015-02-25 22:54:30 UTC
Created attachment 297930 [details] [review]
Use formatTime() for timestamps

Replace the time formatting in notifications and events with the
new utility method - this makes sure that all times are now following
the clock-format setting and use LC_TIME.
Comment 5 Florian Müllner 2015-02-25 22:54:37 UTC
Created attachment 297931 [details] [review]
util: Use GLib.DateTime in formatTime()

The world clock uses GLib.DateTime instead of the built-in Date type
because of the much superior timezone support, and therefore cannot
use the new formatTime() helper. To make this possible, modify the
method to support a parameter of either type.
Comment 6 Florian Müllner 2015-02-25 22:54:43 UTC
Created attachment 297932 [details] [review]
dateMenu: Use formatTime() for world clock
Comment 7 Florian Müllner 2015-02-25 22:54:50 UTC
Created attachment 297933 [details] [review]
util: Add createTimeLabel()

On locales that support it, time formats should follow the 12-hour/24-hour
preference, which implies that they should be updated when the setting
changes. So add another utility method which creates a label for a specific
time and keeps it in sync with the format setting.
Comment 8 Florian Müllner 2015-02-25 22:54:58 UTC
Created attachment 297934 [details] [review]
Use createTimeLabel() where appropriate
Comment 9 drago01 2015-03-04 12:07:37 UTC
Review of attachment 297929 [details] [review]:

LG.
Comment 10 drago01 2015-03-04 12:08:45 UTC
Review of attachment 297930 [details] [review]:

LG.
Comment 11 drago01 2015-03-04 12:10:11 UTC
Review of attachment 297931 [details] [review]:

OK.
Comment 12 drago01 2015-03-04 12:10:40 UTC
Review of attachment 297932 [details] [review]:

OK.
Comment 13 drago01 2015-03-04 12:11:44 UTC
Review of attachment 297933 [details] [review]:

OK.
Comment 14 drago01 2015-03-04 12:12:41 UTC
Review of attachment 297934 [details] [review]:

LG.
Comment 15 Florian Müllner 2015-03-04 12:55:38 UTC
Attachment 297929 [details] pushed as ebf1327 - util: Add formatTime() helper method
Attachment 297930 [details] pushed as 1c36ade - Use formatTime() for timestamps
Attachment 297931 [details] pushed as 60f6715 - util: Use GLib.DateTime in formatTime()
Attachment 297932 [details] pushed as 39fd7b9 - dateMenu: Use formatTime() for world clock
Attachment 297933 [details] pushed as 8f424e7 - util: Add createTimeLabel()
Attachment 297934 [details] pushed as d850593 - Use createTimeLabel() where appropriate