MX-19 Beta 2.1 Feedback
Re: MX-19 Beta 2.1 Feedback
Which other locales prefer 24 hour time? Is there an easy way for a program or script to figure this out that works on both antiX and MX?
- dolphin_oracle
- Developer
- Posts: 22325
- Joined: Sun Dec 16, 2007 12:17 pm
Re: MX-19 Beta 2.1 Feedback
see my post above. there are only a few that want 12. so the live media defaults to 24 and then we set to 12 if we find one of those locales.AK-47 wrote: Tue Sep 17, 2019 9:10 am Which other locales prefer 24 hour time? Is there an easy way of figuring this out that works on both antiX and MX?
Code: Select all
case $LNG in
LANG=en_US.UTF-8|LANG=en_AU.UTF-8|LANG=en_CA.UTF-8|LANG=en_NZ.UTF-8|LANG=ar_EG.UTF-8|LANG=el_GR.UTF-8|LANG=sq_AL.UTF-8) changeto12hour
;;
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Re: MX-19 Beta 2.1 Feedback
Re: preset timeformat within the installer.
FWIW, for the conky timeformat I'm using to determine the time format
from the locale definition of lc_time, as some locale do have both 12h and 24h definitions :
Check:

FWIW, for the conky timeformat I'm using to determine the time format
from the locale definition of lc_time, as some locale do have both 12h and 24h definitions :
Code: Select all
locale -k d_t_fmt | grep -sqo -E '%r|%p|%I' && echo 12h || echo 24h
Code: Select all
LANG=en_GB.UTF-8 locale -k d_t_fmt | grep -sqo -E '%r|%p|%I' && echo 12h || echo 24h
24h
LANG=en_US.UTF-8 locale -k d_t_fmt | grep -sqo -E '%r|%p|%I' && echo 12h || echo 24h
12h

Re: MX-19 Beta 2.1 Feedback
icons only is is better for the task switcher than window preview (wm tweaks>compositor)
Re: MX-19 Beta 2.1 Feedback
Which raises the question is the above 12h-list of locales still valid if we take into account Debian's "nominative" LOCALE defintion for LC_TIME based on POSIX standard?dolphin_oracle wrote: Tue Sep 17, 2019 9:12 amsee my post above. there are only a few that want 12. so the live media defaults to 24 and then we set to 12 if we find one of those locales.AK-47 wrote: Tue Sep 17, 2019 9:10 am Which other locales prefer 24 hour time? Is there an easy way of figuring this out that works on both antiX and MX?
LNG is pulled from /etc/default/localeCode: Select all
case $LNG in LANG=en_US.UTF-8|LANG=en_AU.UTF-8|LANG=en_CA.UTF-8|LANG=en_NZ.UTF-8|LANG=ar_EG.UTF-8|LANG=el_GR.UTF-8|LANG=sq_AL.UTF-8) changeto12hour ;;
Code: Select all
DATE(1) User Commands DA
NAME
date - print or set the system date and time
FORMAT controls the output. Interpreted sequences are:
%c locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
Let's compare it using the above 12h-LOCALE list with a little bash-script:
Code: Select all
for l in LANG=en_US.UTF-8 LANG=en_AU.UTF-8 LANG=en_CA.UTF-8 LANG=en_NZ.UTF-8 LANG=ar_EG.UTF-8 LANG=el_GR.UTF-8 LANG=sq_AL.UTF-8; do L=${l#LANG=}; D=$( LANG=$L TZ=Australia/Perth date '+%c' ); LANG=$L locale -k d_t_fmt | grep -sqo -E '%r|%p|%I' && echo "$L : 12h : $D" || echo "$L : 24h : $D"; done
en_US.UTF-8 : 12h : Wed 18 Sep 2019 03:48:23 PM AWST
en_AU.UTF-8 : 24h : Wed 18 Sep 2019 15:48:23 AWST
en_CA.UTF-8 : 12h : Wed 18 Sep 2019 03:48:23 PM AWST
en_NZ.UTF-8 : 24h : Wed 18 Sep 2019 15:48:23 AWST
ar_EG.UTF-8 : 12h : 18 سبت, 2019 AWST 03:48:24 م
el_GR.UTF-8 : 12h : Τετ 18 Σεπ 2019 03:48:24 μμ AWST
sq_AL.UTF-8 : 12h : 2019-Sht-18 03.48.24.MD AWST
Let's have a look on all 61 locales which are enabled by default and list all which have 12h-LC_TIME definition, this way:
Code: Select all
for l in $(locale -a| grep utf8 ); do L=${l%utf8}UTF-8; D=$( LANG=$L TZ=Australia/Perth date '+%c' ); LANG=$L locale -k d_t_fmt | grep -sqo -E '%r|%p|%I' && echo "$L : 12h : $D" || echo "$L : 24h : $D"; done | grep 12h
ar_EG.UTF-8 : 12h : 18 سبت, 2019 AWST 04:40:59 م
el_GR.UTF-8 : 12h : Τετ 18 Σεπ 2019 04:40:59 μμ AWST
en_CA.UTF-8 : 12h : Wed 18 Sep 2019 04:40:59 PM AWST
en_US.UTF-8 : 12h : Wed 18 Sep 2019 04:40:59 PM AWST
ko_KR.UTF-8 : 12h : 2019년 09월 18일 (수) 오후 04시 40분 59초
sq_AL.UTF-8 : 12h : 2019-Sht-18 04.40.59.MD AWST
Suggest we adjust the above 12h-list within /usr/local/bin/clock12or24 to reflect Debian's locale LC_TIME format accordingly.

Re: MX-19 Beta 2.1 Feedback
Nice stuff!
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin
Re: MX-19 Beta 2.1 Feedback
Right, coming back to @chrispop99 mentioned regression and combine this with the above result about Debian's 12-h LC_TIME defintion, we might consider to change the way we are calling adjusting orageclock's time format.chrispop99 wrote: Tue Sep 17, 2019 4:13 am Time zone regression
In MX-18 and earlier versions, using the function keys at the boot screen to set Language to UK, and Time Zone to London allowed the Conky clock and the panel clock to display correctly in 24 hour format. During installation, on the 'Locale...' screen, the 'Configure clock' radio button was correctly pre-set to 24 hour format.
This is broken in MX-19; the function key settings are not respected as the clocks display in 12 hour format, and at the installer screen the 12 hour radio button is pre-set.
The current way of setting Orage-time format is based on system-locale. But this does not reflect that we do use session-locale based on the locale chosen during login.
Example: If we have a 12h-locale en_US.UTF-8 as system locale but would login using en_GB.UTF-8 as login/session locale
the Orage-clock would still show 12h-format of en_US instead of 24h

Suggest fixing /usr/local/bin/clock12or24 handling based on user's session locale at login to have Orage clock display time format properly.

- dolphin_oracle
- Developer
- Posts: 22325
- Joined: Sun Dec 16, 2007 12:17 pm
Re: MX-19 Beta 2.1 Feedback
The time discussion is fascinating but I want to remind devs here that may not remember but we initially used the time formats described in the locale information and we were told by several users that they were incorrect. So we generated the list of exclusions instead.
Also, the clock12or24 script was written by design to only runonce. If it's adjusted to run for every session login, then the risk of nuking custom formatting in high for min. gain
Also, the clock12or24 script was written by design to only runonce. If it's adjusted to run for every session login, then the risk of nuking custom formatting in high for min. gain
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Re: MX-19 Beta 2.1 Feedback
Question remains, is this list valid. Debian's locale definitions got updates over time.dolphin_oracle wrote: Wed Sep 18, 2019 6:35 am The time discussion is fascinating but I want to remind devs here that may not remember but we initially used the time formats described in the locale information and we were told by several users that they were incorrect. So we generated the list of exclusions instead.
Also note most of the above do have both a 12h and a 24h defintion within the locale.
So do we have user from Australia, New Zealand or Korea, who can confirm what format is the most appropriate one or most currently accepted one.
EDIT:
Date_and_time_notation_in_Australia wrote: The Australian government allows writing the time using either the 24-hour clock (05:55), which is commonplace in technical fields such as aviation, computing, navigation, and the sciences; or the 12-hour clock (5:55 am). The before noon/after noon qualifier is usually written as "am" or "pm". A colon is the preferred time separator
Re: MX-19 Beta 2.1 Feedback
Speaking as an old git of 65, I think that computers should use the 24-hour clock. It just looks more specific and technological. 12 hour clocks are for colloquial fuzzy time telling (as in "just gone 20 past 5")
Desktop: Mini-Box M350 with Asus H110i-plus motherboard, Pentium G4600 processor, 2TB SSD and 16Gb RAM DDR4-2133
Printer/Scanner: Brother MFC-J5335W
Laptop: Lenovo V15 ADA
Media Centre: Lenovo Q190
Printer/Scanner: Brother MFC-J5335W
Laptop: Lenovo V15 ADA
Media Centre: Lenovo Q190