Linux: Changing Date Format in Detailed Display in Dolphin File Manager

While there are many file managers to choose from when using a Linux-based operating system, the default file manager that comes with KDE – Dolphin – is pretty good.  I’ve run into a few issues here and there that I wish were different, but it generally does what I need.

There is one aspect of Dolphin that I always end up changing, but can never remember how, even though it is quite easy to do.  When using the “detailed” view mode in Dolphin, it displays the Date files and folders were last modified.  However, by default, it displays just the month and day the file was last modified, which isn’t very helpful when you’ve got files that are years or even decades old:

Dolphin01

Changing the Date format is quite easy, but it’s not very intuitive as it isn’t done inside Dolphin.  If you look under “Settings -> Configure Dolphin” you won’t see an option to change this:

Dolphin02

 

Dolphin03

It turns out, because of Dolphin’s close integration with KDE, the place to change the Date format is in the System Settings. Open System Settings:

Dolphin04

Once you have System Settings open, where you change this isn’t all that intuitive initially.  Click on “Locale” to open the settings specific to your location (in KDE 5 this is called “Regional Settings”):

Dolphin05

This will open a new window with a bunch of tabs.  You want the “Date & Time” tab:

Dolphin06

The setting you want to change is “Short date format:”.  You can modify this to set the Date in Dolphin however you want it.  “MM” = month. “DD” = day. “YY” = year.  If you have additional questions, you can click on the Help button at the bottom of the window (or see below for what the Help screen says about Date & Time settings).  All I want to do is add the year or “YY” to the end of the “Short date format:” like this:

Dolphin07

Once you’ve done that, hit “Apply” in the bottom right corner of the window.  Now, anywhere in the KDE desktop where the “Short date format” is displayed, it will display it how you want it.  You can go back to Dolphin and check to make sure it is working (Hint: You may need to hit F5 to refresh the display in Dolphin so the new date format will display):

Dolphin08

 

 

NOTE: Below is the information provided in the KDE Help Center about the settings for displaying the Date & Time:

Date & Time
On this tab, you can select options for how date and time values are input or displayed. The defaults are selected automatically based on the country which is currently selected.

In the Time format text box you can enter the format that you want to use to input and display times. The format entered is a combination of special codes representing time components and literal text used to separate the time components. The special time component codes are listed below. You can set the format to any combination of time components you like, but you should always include at least an hour and minutes portion to allow you to input times that are not ambiguous. The drop-down box provides a list of common time formats in your currently selected language to choose from.

  • HH – The hour as a decimal number using a 24-hour clock (00-23).
  • hH – The hour as a decimal number using a 24-hour clock (0-23).
  • PH – The hour as a decimal number using a 12-hour clock (01-12).
  • pH – The hour as a decimal number using a 12-hour clock (1-12).
  • MM – The minutes as a decimal number (00-59).
  • SS – The seconds as a decimal number (00-59).
  • AMPM – Either ‘AM’ or ‘PM’ according to the given time value. Noon is treated as ‘PM’ and midnight as ‘AM’. You should always include this code if you are using the 12-hour clock codes PH or pH to prevent ambiguity when entering times.

In the AM symbol text box you can enter the symbol that you want to use to input or display for AM when using a 12-hour clock. The drop-down box provides a list of common symbols for your currently selected language to choose from. In the PM symbol text box you can enter the symbol that you want to use to input or display for PM when using a 12-hour clock. The drop-down box provides a list of common symbols for your currently selected language to choose from.

In the Long date format text box you can enter the format that you want to use to input and display long dates. The format entered is a combination of special codes representing date components and literal text used to separate the date components. The special date component codes are listed below. You can set the format to any combination of date components you like, but you should always include at least enough components to uniquely identify a day in the year, e.g. a month and day, to allow you to input dates that are not ambiguous. If you don’t include a year component then the current year will be used. The drop-down box provides a list of common date formats in your currently selected language to choose from.

  • YYYY – The year with century as a decimal number (0000-9999).
  • YY – The year without century as a decimal number (00-99).
  • MM – The month as a decimal number (01-12).
  • mM – The month as a decimal number (1-12).
  • MONTH – The full month name.
  • SHORTMONTH – The first three characters of the month name.
  • DD – The day of month as a decimal number (01-31).
  • dD – The day of month as a decimal number (1-31).
  • WEEKDAY – The full weekday name.
  • SHORTWEEKDAY – The first three characters of the weekday name.
  • ERAYEAR – The Era Year in local format (e.g. 2000 AD).
  • SHORTERANAME – The short Era Name (e.g. AD).
  • YEARINERA – The Year in Era as a decimal number (e.g. 2000).
  • DAYOFYEAR – The Day of Year as a decimal number.
  • ISOWEEK – The ISO Week as a decimal number.
  • DAYOFISOWEEK – The Day of the ISO Week as a decimal number.

In the Short date format text box you can enter the format that you want to use to input and display short dates. This is in the same format as the Long date format, please read that section for more details. The drop-down box provides a list of common date formats in your currently selected language to choose from.

The Digit set drop down box lists digit sets which may be used instead of Arabic digits when displaying dates and times. If you select a digit set other than Arabic, it will be applied only to numbers which appear in a language context that uses that digit set while Arabic digits are still going to be used elsewhere, e.g. Arabic-Indic digits will be applied to Arabic but not to American English.

Loading


Posted

in

by

Comments

6 responses to “Linux: Changing Date Format in Detailed Display in Dolphin File Manager”

  1. ivan Avatar
    ivan

    thanks bro, american date sucks

  2. geoff m Avatar
    geoff m

    I need to change this setting because my locale default date format doesn’t make any sense. seems like in KDE 5 I can only choose from pre-configured date formats corresponding to a locale. Unfortunately none of them are any good. Do you know if there is some place hidden where I can set this?

    1. ryan Avatar

      I just looked, and I don’t see any way to customize this now. It looks like KDE 5 now makes this even less intuitive and less customizable than it was in KDE 4. You should complain to the KDE developers.

  3. Georg H Avatar
    Georg H

    Thank you very much! This was at least a part of the solution for me.
    For everyone who uses KDE applications like dolphin or konqueror without the whole KDE, and therefore has no KDE systemsettings:
    To change date format, edit the following file:

    $HOME/.kde/share/config/kdeglobals

    To be safe, search for “[Locale]”. It probably does not exist, if you do not have KDE systemsettings.
    Add the lines between the ### (or modify them):
    ###
    [Locale]
    DateFormat=%A, %Y-%m-%d
    DateFormatShort=%Y-%m-%d
    TimeFormat=%H:%M:%S
    ###
    This example uses ISO date/time format, like “2020-11-30 17:20:55”.

    Where is this documented? – Don’t ask me!
    All I found was https://community.kde.org/KDE_Core/KLocale
    saying “KDE Localization is a walled garden. We pay very little attention to the host system Locale settings, …”
    Oh yes, I noticed that. … not a single word about where these settings are, no link to some docs, nothing!

    I made these changes first on a KDE system, and grep-ed through the .kde directory for “date” and “format” or searched for changed files. Somehow reverse engineering. If someone finds a place were all KDE config file settings are described, please let me know.

    1. Espedilla Avatar
      Espedilla

      Thanks for the great research and posting this, but it didn’t work for me on KDE Neon (rebooting the machine to try to get the settings picked up).

      The procedure described in the article is no longer applicable – there is no way to input a custom date format. Tying users to the format of their locale? Having to guess what the format is for any given locale? What a mess!

Leave a Reply

Your email address will not be published. Required fields are marked *