From 39fd7b9a05a75dabd19628ab1ac4afe007404bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 25 Feb 2015 20:26:08 +0100 Subject: [PATCH] dateMenu: Use formatTime() for world clock https://bugzilla.gnome.org/show_bug.cgi?id=745111 --- js/ui/dateMenu.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js index 76d66fcc3..cd77c41be 100644 --- a/js/ui/dateMenu.js +++ b/js/ui/dateMenu.js @@ -200,23 +200,11 @@ const WorldClocksSection = new Lang.Class({ }, _updateLabels: function() { - let desktopSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' }); - let clockFormat = desktopSettings.get_string('clock-format'); - let hasAmPm = new Date().toLocaleFormat('%p') != ''; - - let format; - if (clockFormat == '24h' || !hasAmPm) - /* Translators: Time in 24h format */ - format = N_("%H\u2236%M"); - else - /* Translators: Time in 12h format */ - format = N_("%l\u2236%M %p"); - for (let i = 0; i < this._locations.length; i++) { let l = this._locations[i]; let tz = GLib.TimeZone.new(l.location.get_timezone().get_tzid()); let now = GLib.DateTime.new_now(tz); - l.actor.text = now.format(format); + l.actor.text = Util.formatTime(now, { timeOnly: true }); } } });