dateMenu: Format weather forecast times without AM/PM

If the clock is set to 12h, the AM/PM in the weather forecast times
should be clear from the context, because they are the immediately
following hours. This makes it less likely that the times will be
ellipsized (in which case the AM/PM wouldn't be shown anyway.)

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/835
This commit is contained in:
Philip Chimento
2019-11-19 13:15:34 -08:00
parent c1a7c71549
commit 83f224e08b
2 changed files with 10 additions and 1 deletions

View File

@ -336,6 +336,7 @@ class WeatherSection extends St.Button {
let [ok_, timestamp] = fc.get_value_update();
let timeStr = Util.formatTime(new Date(timestamp * 1000), {
timeOnly: true,
ampm: false,
});
let icon = new St.Icon({ style_class: 'weather-forecast-icon',