- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom/locale-based date format #1767
Comments
MC use two timeformats - for files with mtime between now and "6 moths old" (like "Nov 2 00:56") and for other files (like "Jun 23 2007")
I think it could be useful to have custom time format in settings for both of these cases - if you want to have same timeformat regardless of file age, you can set both formats to same value.
Then you could be able to set your own timeformat
Created branch 1767_custom_date_format |
I referred to these two timeformats as 'date' and 'time' - but yes, that's exactly what I have on my mind:) Thnx! |
The patch is in branch 1767_custom_date_format
The timeformat can be configured in ~/.mc/ini in Misc section, using strftime format, like for example the format I am now personally using:
There is no way (yet) to configure it inside MC, but I guess that would be solved in future by implementing #1516 |
Not setting to rework, but nothing happens to me when setting (or any thing other):
[Misc] |
This is weird, for me it works.
Also, there is already a [Misc] section in the ~/.mc/ini by default, so if there is, you probably need to add just the two lines there, I am not sure how config system will handle two [Misc] sections in the ini file.
If it still is not working - can you post here your entire .mc/ini? |
Branch rebased and reworked:
In commit I was add freezing of timeformat variables.
Review, please.
Martin: for update your local branch use commands:
|
remember rebasing before merge ;-p |
|
Branch rebased.
New initial changeset: [83a7b337db7f62f60b96bed1f7587af10010f12f] |
|
|
|
Important
This issue was migrated from Trac:
gotar
(gotar@….pl)MTime in panels since always is displayed as:
MMM dD YYYY
MMM dD hh:mm
where:
MMM=abmon
dD=day of month (1 or 2 digits)
YYYY=year
hh:mm=time (24h clock)
This leads to several issues:
http://sourceware.org/bugzilla/show_bug.cgi?id=3156
http://sourceware.org/bugzilla/show_bug.cgi?id=4789
https://bugzilla.redhat.com/show_bug.cgi?id=242296
so current glibc abmons are allowed but not official.
2a. even if abmons are defined, it's bad assumption that they have the same length. For example when glibc team had changed polish to roman numbers (I, II, ... VIII...) there were problems like mentioned here:
https://bugzilla.redhat.com/show_bug.cgi?id=243513
Fortunately this change was eventually reverted and so now we have:
$ LC_TIME=pl_PL locale -k d_fmt abmon t_fmt abday d_t_fmt
d_fmt="%d.%m.%Y"
abmon="sty;lut;mar;kwi;maj;cze;lip;sie;wrz;paź;lis;gru"
t_fmt="%T"
abday="nie;pon;wto;śro;czw;pią;sob"
d_t_fmt="%a, %-d %b %Y, %T"
I think date and time format should be configurable directly by strftime format string with an option to simply follow d_t_fmt. Length of such string could be calculated cycling through all format elements or explicitly given.
The text was updated successfully, but these errors were encountered: