! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Add %_H:%M to preset digital clock formats
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description Adam Purkrt 2019-10-12 12:33:45 CEST
Created attachment 9109 
clock-digital-formats.diff

I think the digital clocks format (Layout=Digital, Clock Options/Format) lacks %H:%M option. The patch adds this option.

I know there is "Custom Format", but %H:%M (i.e.: "16:32") seems such a basic option, it should be included among the presets.
Comment 1 Simon Steinbeiss editbugs 2019-10-13 01:12:28 CEST
I could imagine replacing "%r" with "%R", which is what you're after I guess.

I wonder if anyone cares about seconds not being part of the presets, but to be honest it doesn't feel too reasonable.
Comment 2 Adam Purkrt 2019-10-13 08:28:52 CEST
Yeah, %R is the format I miss in the preset formats.

In more length: I do not like the current default, which is to show the date in the clocks all the time. The date occupies valuable space, I do not need to know it that often and when I want to know it (once in a day, usually), I hover the mouse above the clock.

IMO the default for the clock should be "08:22 AM" ("%I:%M %p") for locales that use AM/PM (US locale) and "08:22" (%R) otherwise (cs_CZ).

Actually - looking now at https://developer.gnome.org/glib/stable/glib-GDateTime.html#g-date-time-format - the leading zero can be removed with an underscore _ and it looks the best without the leading zero (that is what I have on my phone too).

So the format I (being from the Czech republic) now prefer the most (and I think it should be default) is "%_H:%M". For countries that use AM/PM, the default format should imo be "%_I:%M %p".
Comment 3 Adam Purkrt 2019-10-13 09:01:43 CEST
Created attachment 9112 
digital-24h-without-leading-zeros.p

This is the change I would prefer now.
Comment 4 Adam Purkrt 2019-10-22 09:53:18 CEST
In XFCE 4.12, the 24h format without the date was the default and the first option in clock options/format. Perhaps this changed with the move to gtk3, since I do not see any change on the corresponding line

https://git.xfce.org/xfce/xfce4-panel/blame/plugins/clock/clock.c#n180
Comment 5 Adam Purkrt 2019-10-22 09:54:17 CEST
Created attachment 9138 
clocks and clock options in XFCE 4.12
Comment 6 Adam Purkrt 2019-10-22 10:00:53 CEST
Created attachment 9139 
clocks and clock options in XFCE 4.12

better screenshot with en_US locale
Comment 7 Adam Purkrt 2019-10-22 10:21:41 CEST
It has nothing to do with gtk3, it was just changed recently
https://git.xfce.org/xfce/xfce4-panel/commit?id=2c69eeb88871829d165b480d8ad9b6a704e09568
bug 15456
Well I miss the old default. Display time as "%R" always, date only on mouseover.
(and "%_H:%M" i.e. without the leading zero is even better)
Comment 8 Git Bot editbugs 2019-11-09 23:23:32 CET
Simon Steinbeiss referenced this bugreport in commit e8c6fc408d0c0e750420633c8424498c9439cc17

clock: Add back hour:min to format presets (Bug #16035)

https://git.xfce.org/xfce/xfce4-panel/commit?id=e8c6fc408d0c0e750420633c8424498c9439cc17
Comment 9 Simon Steinbeiss editbugs 2019-11-09 23:24:51 CET
The default layout was updated for a reason, but I added the %R back in your amended version, with %_H.

Distributions can modify these upstream values anyway (e.g. Xubuntu has had a different default layout for many years) and it should be easy enough to switch to another layout.
Comment 10 Adam Purkrt 2019-11-10 06:35:43 CET
Thank you!

Bug #16035

Reported by:
Adam Purkrt
Reported on: 2019-10-12
Last modified on: 2019-11-10

People

Assignee:
Simon Steinbeiss
CC List:
1 user

Version

Version:
4.14.1

Attachments

clock-digital-formats.diff (291 bytes, patch)
2019-10-12 12:33 CEST , Adam Purkrt
no flags
digital-24h-without-leading-zeros.p (267 bytes, patch)
2019-10-13 09:01 CEST , Adam Purkrt
no flags
clocks and clock options in XFCE 4.12 (171.10 KB, image/png)
2019-10-22 09:54 CEST , Adam Purkrt
no flags
clocks and clock options in XFCE 4.12 (149.28 KB, image/png)
2019-10-22 10:00 CEST , Adam Purkrt
no flags

Additional information