MX-19 Beta 2.1 Feedback

Message
Author
User avatar
AK-47
Developer
Posts: 1212
Joined: Sun Mar 24, 2019 7:04 pm

Re: MX-19 Beta 2.1 Feedback

#371 Post by AK-47 »

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?

User avatar
dolphin_oracle
Developer
Posts: 22325
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX-19 Beta 2.1 Feedback

#372 Post by dolphin_oracle »

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?
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.

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
	;;
LNG is pulled from /etc/default/locale
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.

User avatar
fehlix
Developer
Posts: 12734
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX-19 Beta 2.1 Feedback

#373 Post by fehlix »

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 :

Code: Select all

locale  -k d_t_fmt | grep  -sqo -E '%r|%p|%I' && echo 12h || echo 24h
Check:

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

:puppy:

wurthrk

Re: MX-19 Beta 2.1 Feedback

#374 Post by wurthrk »

icons only is is better for the task switcher than window preview (wm tweaks>compositor)

User avatar
fehlix
Developer
Posts: 12734
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX-19 Beta 2.1 Feedback

#375 Post by fehlix »

dolphin_oracle wrote: Tue Sep 17, 2019 9:12 am
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?
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.

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
	;;
LNG is pulled from /etc/default/locale
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?

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)
So if we assume that Debian's date '+%c' will show 12/24h format properly, let's compare the above mentioned 12h-list with Debian's defintion of LC_TIME format as "appropriate date and time representation".
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
Now what? Who is right? The comparison might tell us Debian's definition for en_AU and en_NZ would be a 24h-format instead of a 12h format.
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
So this might be the list of 12h-locales, which currently defines Debian's LC_TIME representation based on POSIX standard.
Suggest we adjust the above 12h-list within /usr/local/bin/clock12or24 to reflect Debian's locale LC_TIME format accordingly.
:puppy:

User avatar
Jerry3904
Administrator
Posts: 23257
Joined: Wed Jul 19, 2006 6:13 am

Re: MX-19 Beta 2.1 Feedback

#376 Post by Jerry3904 »

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

User avatar
fehlix
Developer
Posts: 12734
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX-19 Beta 2.1 Feedback

#377 Post by fehlix »

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.
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.
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 :eek:
Suggest fixing /usr/local/bin/clock12or24 handling based on user's session locale at login to have Orage clock display time format properly.
:puppy:

User avatar
dolphin_oracle
Developer
Posts: 22325
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX-19 Beta 2.1 Feedback

#378 Post by dolphin_oracle »

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
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.

User avatar
fehlix
Developer
Posts: 12734
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX-19 Beta 2.1 Feedback

#379 Post by fehlix »

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.
Question remains, is this list valid. Debian's locale definitions got updates over time.
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

davemx
Posts: 320
Joined: Sun Aug 12, 2018 2:31 pm

Re: MX-19 Beta 2.1 Feedback

#380 Post by davemx »

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

Locked

Return to “General”