Ask Your Question

ISO8601 date and time format seems to be unavailable.

asked 2016-02-20 15:43:03 -0500

jadesword gravatar image

updated 2016-02-22 05:24:43 -0500

Is there a way to use the ISO8601 date and time format?

[+%a %F %T %:::z] {Sun 2016-02-21 17:33:29 -07} is my preferred format, but I have no idea where or how to make the required modifications so that this format will be universally and permanently displayed.

edit retag flag offensive close merge delete



In what context? Where would you like to use it? Your question could need some improvement, although I applaud your desire to use the web’s date format.

Aeyoun gravatar imageAeyoun ( 2016-02-20 17:23:22 -0500 )edit

Would like all dates and times to be formatted ddd YYYY-MM-DD hh:mm:ss ±hh:mm Three character day of the week, four digit year, two digit month, two digit day, two digit hour (0-23), two digit minute, two digit second. The last time I entered this data, I included the reason, which may be why the comment was deleted.

jadesword gravatar imagejadesword ( 2016-02-21 11:01:57 -0500 )edit

But where? In what GUI? Which desktop do you use? Etc.

Aeyoun gravatar imageAeyoun ( 2016-02-22 02:32:39 -0500 )edit

I am new to fedora. I want to implement the change everywhere date and time are displayed.

The following was found in All Settings/Details/Overview. Perhaps this will answer some of your questions. Looks like it needs a fixed width font to display properly.

         OS   Fedora 20
Device name   localhost.localdomain
     Memory   34.4 GiB
  Processor   AMD FX(tm)-8350 Eight-Core Processor x 8
    OS Type   64-bit
   Graphics   Gallium 0.4 on AMD PITCAIRN
      Gnome   Version 3.10.2
       Disk   2.0 TB

jadesword gravatar imagejadesword ( 2016-02-22 05:14:07 -0500 )edit

Must I continue to deal with unfamiliar date formats? Nothing I tried so far has worked.

jadesword gravatar imagejadesword ( 2016-02-26 03:54:40 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2016-02-20 21:01:04 -0500

florian gravatar image

updated 2016-02-20 21:06:59 -0500

Assuming you want the date printed in the so called "international format" or "internet format", the correct terminal command(s) for GNU Linux is/are:

date +%y/%m/%d



date +%G/%m/%d


whichever year format you prefer.

man date will provide you additional information

edit flag offensive delete link more


Using "man date", found something that seems to work in terminal, but nowhere else. I even tried to re-boot to see if it would change anything, but I saw no difference.

$ date +%a %F %T %:::z
Sun 2016-02-21 17:33:29 -07
$ date
Sun Feb 21 17:33:44 MST 2016

Would seem that I need to enter the format in a file somewhere.

Do I need to enter it in multiple files for every program that invokes date and time?

jadesword gravatar imagejadesword ( 2016-02-21 20:41:17 -0500 )edit

Run command:

gsettings set org.gnome.desktop.interface clock-show-date true

florian gravatar imageflorian ( 2016-02-21 21:59:55 -0500 )edit

Interesting command, but the problem is formatting the display of date and time everywhere. So far, the only place I can change the format is in the terminal and it is a one time modification of format that is not permanent and does not change the display anywhere else. This does not change the display format in terminal, as shown above. My preference is Sun 2016-02-21 17:33:29 -07, but unless I know what file(s) to modify, I will be unable to implement a permanent change of format anywhere.

jadesword gravatar imagejadesword ( 2016-02-22 04:38:23 -0500 )edit

OK, I now better understand what you want. What you what to do is actually to change you environment variable LC_TIME to en_DK.UTF-8. Type locale or locale | grep TIME to find out your current setting. you try this: localectl set-locale LC_TIME=en_DK.UTF-8. Logoff and on again to see if it works. Settings are written to /etc/locale.conf

florian gravatar imageflorian ( 2016-02-22 09:06:17 -0500 )edit

If that doesn't work, than Gnome is probably overwriting this setting with whatever your define in gnome. @masteroman is suggesting here to set Gnome's Language to en_DK but that has a whole lot of other implications. Instead, you could follow this guide here.

florian gravatar imageflorian ( 2016-02-22 09:19:56 -0500 )edit

answered 2016-02-20 17:33:07 -0500

masteroman gravatar image

If you want to use it in Gnome to display date in that format you could select "Denmark (English)" under Settings > Region & Language > Formats

Source: Arch Wiki

edit flag offensive delete link more



Note that selecting a region other than your actual region will have other effects too. Like changing your web browser’s Accept-Language header and all sorts of unforeseen consequences. Use Greenland (English–Denmark) with caution.

Aeyoun gravatar imageAeyoun ( 2016-02-20 17:40:16 -0500 )edit

Seems that all of my answers were deleted. Need to know what file and where the file should be located to effect a change. Knowing what to enter does not help if there is no data as to where it is to be entered. I hope that this comment is not deleted so I may get a useful answer.

jadesword gravatar imagejadesword ( 2016-02-21 05:34:55 -0500 )edit

I tried Settings > Region & Language > Formats and previewed DK and found too many unacceptable differences. I was unable to find en_DK.utf8 or even en_US.utf8, but I did find en_US that has options for changing the time format. Unfortunately, it seems the calls for the format are not directed there. I need to find the script for the calls and change en_US.utf8 and change it to en_US so the calls are directed to where the formats reside.

I noticed that en_US uses ISO8601, so very little modification was required. I even entered comments that translate unicode into human readable format.

jadesword gravatar imagejadesword ( 2016-02-24 16:01:48 -0500 )edit

Tried and failed to use en_US as locale.

jadesword gravatar imagejadesword ( 2016-02-26 03:56:48 -0500 )edit

Question Tools

1 follower


Asked: 2016-02-20 15:43:03 -0500

Seen: 366 times

Last updated: Feb 22 '16