3

The date in the middle of the Panel shows "sön 14:20" I want it to be shown as 2018-03-11 14:20 (ISO 8601)

The date of files in the terminal are also written in a weird format "aug 29 2017", I want it to be written as: 2018-08-29 HH:dd (ISO 8601)

I can see many posts in different websites how to change the date to be displayed according to standard in Ubuntu since many years, but none of them works for me using Ubuntu 17.10.

I see two alternatives. One is to open the DebConf editor and change the value in /com/canonical/indicator/datetime/custom-time-format. I have tried this and added:

%Y-%m-%D %H:%M

It does not work. The date is still shown in the default format.

The other alternative is to add it through the terminal. I have also tried this without any success:

sudo gsettings set com.canonical.indicator.datetime time-format 'custom'

(process:3756): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=265b2cb0154141aeb8efd34ee20c7e11 --binary-syntax --close-stderr”: Child process exited with code 1

sudo gsettings set com.canonical.indicator.datetime custom-time-format '%Y-%m-%d %H:%M:%S'

(process:3779): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=265b2cb0154141aeb8efd34ee20c7e11 --binary-syntax --close-stderr”: Child process exited with code 1

Please help me to display time according to the standard.

karel
  • 114,770
  • 1
    For "date of files in the terminal" I assume you are referring to the ls command? if so, you can add --time-style=long-iso or --time-style=posix-long-iso to the relevant aliases in your ~/.bashrc – steeldriver Mar 11 '18 at 13:55
  • clock override corrected the format in my top panel. – Martin Gustafsson Mar 11 '18 at 16:36
  • alias in bash corrected the format in the terminal – Martin Gustafsson Mar 11 '18 at 16:37
  • I still have wrong format in the file browser and I don't find where I can modify this. – Martin Gustafsson Mar 11 '18 at 16:38
  • I searched for a way to display time in Nautilus according to ISO 8601, but gave up. Instead I installed Nemo which is easy to configure and made it my default file browser. So my problem were solved in 3 completely different ways. Now I have a ISO 8601 compliant Ubuntu :-) – Martin Gustafsson Mar 12 '18 at 06:28
  • 2
    What you call "weird" Aug 29 2017 most people in North America would called "normal". In the UK and elsewhere it would probably display as 29 Aug 2017 and they would call that "normal". – WinEunuuchs2Unix Mar 12 '18 at 23:30

1 Answers1

4

I thought the time format could be set centrally, once and system wide, but it does not seem like it is possible.

So far I have discovered 3 necessary changes to get the time displayed according to ISO 8601 in the Ubuntu 17.10 desktop. This is the way I did:

  1. Install Clock Override from Software Center and add %F %R in the field: "Text to display instead of the clock".

  2. Add alias ls="ls --time-style=long-iso" in ~/.bash_aliases.

  3. Install Nemo from Software Center and replace Nautilus with Nemo as a favorite in the left side bar. In Nemo it is possible to select the time format in Edit->Preferences->Display according to ISO 8601.

In my country, Windows 7 comes configured according to ISO 8601 out of the box. I think it annoying that it is not in Ubuntu and also that these things are still so complicated to accomplish in Ubuntu.

pomsky
  • 68,507