Custom date and time format (ie ISO-8601) LM14 / Cin1.6

Chat about just about anything else
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 30 days after creation.
Locked
YoelT

Custom date and time format (ie ISO-8601) LM14 / Cin1.6

Post by YoelT »

My system: Linux Mint 14 Nadia // 3.5.0-17-generic (x86_64) // Cinnamon 1.6.7

I have been battling with this on my new install for weeks now, and can not find an entirely acceptable option. Customization of the date/time format displayed is a deal breaker for me when dealing with any computer interface, and I find that the lack of easy customization in an OS such as Linux to be quite surprising and disappointing. Linux can do some amazing things... but we can't customize the way the system date and time is displayed? Really? In Windows or OS X, the OS has always allowed system wide customization of the displayed date and time format, and it takes seconds to change to the desired format. Is Linux really still so primitive that we can't do this with ease? The display of non ISO-8601 date and time formats as a default is not just annoying and a source of confusion, but downright offensive. LOL.

After playing with MATE, Cinnamon and Unity in Ubuntu 12.04 I have found that the current version of LM and CInnamon allow for the most customization easily through the GUI. The date and time format can be customized in three or four locations.

Preferences > Date and Time
Here 24H vs AM/PM can be selected.

Preferences > Cinnamon Settings > Calendar
In which one can entirely customize edit the date and time format for the clock and calendar in the panel. I wish this could be applied system wide, but this is actually still dependent on the language of the Locale.

Open Nemo (the File explorer) > Edit > Preferences > Display
For the file explorer Windows only, ISO-8601 format date is one of 3 options that can be selected.

At this point, it appears that we have customized everything but in actuality, this is only a surface fix. The core OS date and time is still displayed based on the locale. This can be viewed in System Information. If you are using en_US for the locale, you will still get a horrendously awkward date format, as well as a AM/PM 12 hour time display. Any program that displays date/time based on the system locale will display the same.
For example Thunderbird will display mail using this long and awkward date format in the date received column. I really don't have that much screen real estate to want to deal with a column that long.
For Thunderbird I used the Super Date Format add-on to fix this:
https://addons.mozilla.org/en-US/thunde ... te-format/

But this only applies to the date received column. Inside the header of the message the system date/time is displayed. The root problem still exists, all the above fixes just cover it up. It would be easiest to just be able to create a custom locale with the desired date/time and language formatting. I have attempted this and despite numerous attempts on three different OS builds I have always failed.

Several articles and forum posts exist about this, none of which have an option that works for current builds
http://ubuntuforums.org/showthread.php?t=1159293
https://help.ubuntu.com/community/Locale
http://askubuntu.com/questions/200974/h ... ry-setting
http://ubuntuforums.org/showthread.php?t=1973896

Editing the en_US file does not work. Creating a custom locale based on en_US does not work. Every time I attempted this not only was I not able to prevent the system from displaying the default times, I ended up breaking the language support panel to the point where it would not work even after being removed and reinstalled. At one point in Ubuntu I even forced removal of all the locales from the system except for the custom locale with the settings I wanted. Magically, the system still managed to display the standard en_US settings, even though there was no source of these settings! But, my lack of understanding of the basics of Linux may have led to the defeat at all the hacking here.

One last desperate work around:
Preferences > Language Support > Regional Formats
This is the only way to actually modify the way the core system keeps date and time formatting, but there is no ISO-8601 compliant variant. The closest is the en_DK locale that can be used to display time as 2012-12-09T 12:19:01, but I am not a fan of the European style swapping of commas and decimals in long numbers. Currently I am trying the Chinese (Singapore) setting for this as numbers are displayed the same and date is displayed as 2012年12月09日. This only takes a little more space than the ISO format, but this is only tolerable to me because I am familiar enough with the language for this to not be unintelligible.

Surely a functioning custom locale package can be created and installed through the GUI without breaking anything?? Of all the Linux Mint and Ubuntu users out there, surely someone managed to get this to work? Please share if you have.
Last edited by LockBot on Wed Dec 07, 2022 4:01 am, edited 1 time in total.
Reason: Topic automatically closed 30 days after creation. New replies are no longer allowed.
abnvolk

Re: Custom date and time format (ie ISO-8601) LM14 / Cin1.6

Post by abnvolk »

Yes, setting locale is a hard job for me. I hate the default US format, as it displays the time quite awkwardly. My country is Vietnam, so I want to use D/M/Y for time and comma as decimal separator. But because translations for my language is not complete and I've always used English on my computer, not to mention that the full date format is horribly long, I want the locale to be fully customizable. As far as I know this is not possible in GNOME. I'm now using KDE and I can have custom locales again :)
Cinnamon is based on GNOME so it has GNOME's limitations. Hopefully when we have a unified control center more features can be added.
YoelT

Re: Custom date and time format (ie ISO-8601) LM14 / Cin1.6

Post by YoelT »

Ah, so it is the GNOME base that is the problem. So did you just have to edit the locale file for it to function in KDE?
abnvolk

Re: Custom date and time format (ie ISO-8601) LM14 / Cin1.6

Post by abnvolk »

No, I just go to System Settings -> Locales. It has all of the options, just like Windows. There are even lots of calendar and number types, such as coptic, julian (who uses these anyway?), buddhist... calendars, and arabic, thai, lao, hindi.... types of number. :D
YoelT

Re: Custom date and time format (ie ISO-8601) LM14 / Cin1.6

Post by YoelT »

arg. I should have tried that out. Why can this not be implemented in other environments? I will have to see about switching... arg.
josefg
Level 2
Level 2
Posts: 93
Joined: Sun Jun 12, 2011 7:07 pm

Re: Custom date and time format (ie ISO-8601) LM14 / Cin1.6

Post by josefg »

This issue is still relevant in LM16, anno 2013.
We are many who live in a globalized world and don't feel at home with a given country's specific locales anymore.
For example, I want to have english-style number formating, currency set to euro, and date set to D/M/Y. Still struggling to find the right locale and wish that it were easyy to create a custom one.
Sam Sung

Re: Custom date and time format (ie ISO-8601) LM14 / Cin1.6

Post by Sam Sung »

josefg wrote:This issue is still relevant in LM16, anno 2013.
We are many who live in a globalized world and don't feel at home with a given country's specific locales anymore.
For example, I want to have english-style number formating, currency set to euro, and date set to D/M/Y. Still struggling to find the right locale and wish that it were easyy to create a custom one.
WORD! (I have the same problem, wish i could customize it properly and don't want to stick with a pre defined regional setting). Mint 16 Cinnamon
jenningsthecat

Re: Custom date and time format (ie ISO-8601) LM14 / Cin1.6

Post by jenningsthecat »

Me too - this has been a thorn in my side since I started using Linux 6 or 7 years ago, and it hasn't gotten better. I've had all sorts of weird breakages trying to wrestle my system into doing things that should be 30-second exercises. I finally managed to kludge together ISO-like date and time formats that sorta work, (using Debian Wheezy and XFCE). on my old computer. But I'm never sure when it's gonna break on an upgrade or a package change, and every time it does I have to spend a day trying to straighten out the mess. I decided to try LMDE on my new box and had hoped this kind of thing would be better in Mate, but it seems to be worse, so it looks like I'm back to Debian Testing and XFCE. It's a shame - there are lots of things I like about LMDE, but for me too the locale nonsense is a dealbreaker. (Along with the panel animation when I set it to auto-hide animation - can't seem to get rid of that animation, even though mateconf-editor assures me it's disabled...)

I may try out KDE again based on a comment above, but the last time I looked at KDE it was so full of kBling, kBloat, and ugly eye candy that I couldn't get rid of, that I just gave up on it.

For those of you sticking with LMDE, best of luck - maybe I'll join you in a year or so if configurability improves a bit...
Sam Sung

Re: Custom date and time format (ie ISO-8601) LM14 / Cin1.6

Post by Sam Sung »

This can be a start to solve the issue:
Locale Helper - Ease creation and maintenance of glibc locale files
http://lh.2xlibre.net/
one could manually make the desired combination of settings.
Locked

Return to “Open Chat”