coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enhancement Request - General Personalization of Date/Time specifica


From: Pádraig Brady
Subject: Re: Enhancement Request - General Personalization of Date/Time specification
Date: Fri, 23 Aug 2024 10:55:52 +0100
User-agent: Mozilla Thunderbird Beta

On 22/08/2024 23:40, Eric Marceau wrote:
Hello,

Please refer to my postings,

here
(https://github.com/mate-desktop/caja/issues/1712#issuecomment-2305818307),
*where I stated:*

     The issue here is that the *FORMAT* for time and date should be set
     set from the UbuntuMATE Preferences window for Time and Date**, for
     it to be globally applied to the system.

     The choices offered should be

       * either as a *regional/country/ISO default*, or
       * a *personalized version of* a regional/country/ISO default.

     This would involve a *click-toggle to offer* customization of *any
     date/time field*.
     This could include user-defined change of TimeZone, to a specified
     region/country, even if that TimeZone is different than the default,
     I suggest selectable by drop-down).

     Once that specification is chosen/edited, that format specification
     should be *applied universally* for all user-oriented interactions,
     *with the exception* of those that are core system (i.e. *syslog and
     the like*, which would use the regional/county/ISO default
     underlying the user's personalizations.

     Something like that was previously offered in one of the older
     Ubuntu distros (somewhere between 10 and 16) but I can't remember
     which one.

This seems like distro config, not directly applicable to the coreutils date(1) 
command.


and here
(https://github.com/mate-desktop/caja/issues/616#issuecomment-2305779056),
*where I stated:*

     I have this bash logic which I would like to see merged into Caja as
     an option for global time formatting. Would that be possible? (/I
     would like it for the ls command, but I don't think that you handle
     that./ :-) )

     Create customized version of ‘ls l’ to report on files during the
     progress of the script.

     Key aspect is that, *if the modification is older than 24 hours*,
              it reports *only the date*;
     *otherwise*
              it reports *only the time* of the last change *using the
     24-hour clock*.

     |myLs() { #eval stat --format=\"\|\%A\|\%h\|\%s\|\%y\|\%n\|\"
     \"${1}\" eval stat --format=\"\|\%A\|\%h\|\%s\|\%Y\|\%n\|\" \"${1}\"
     | awk -v now=${time_now} '{ n=split( $0, vals, "|" ) ; #mult24=(
     (1.0*now) - vals[5] )/86400 ; #print mult24 ; # 86400 seconds in a
     24 hour period if( ( (1.0*now) - vals[5] )/86400 > 1 ){ printf("%s
     %2s %15s %10s %s\n", vals[2], vals[3], vals[4], strftime("%F",
     vals[5]), vals[6] ) ; }else{ printf("%s %2s %15s %9s %s\n", vals[2],
     vals[3], vals[4], strftime("%R:%S", vals[5]), vals[6] ) ; } ; }' } |

Thank you in advance for your consideration and, hopefully your
acceptance of this feature request.

ls already supports configurable time/date formats for recent and older files.
The threshold is hardcoded at 6 months, which I suppose could be made 
configurable
with a TIME_STYLE_RECENT variable taking a number of seconds.

cheers,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]