Paddy Landau
December 29th, 2020, 04:03 PM
A number of apps display dates and times relatively (like "yesterday") or otherwise inconsistently. That's fine, I guess, for a casual user who only occasionally looks at dates and times, but not for me I find it confusing and distracting.
Normally, these apps give an option to format dates. For example, the default listing for ls is a bit of a mishmash as follows.
$ ls -l
total 0
-rw------- 1 paddy paddy 0 Dec 22 02:34 last-week
-rw------- 1 paddy paddy 0 Feb 3 2019 last-year
-rw------- 1 paddy paddy 0 Mar 12 2020 march
-rw------- 1 paddy paddy 0 Dec 29 10:05 today
-rw------- 1 paddy paddy 0 Dec 28 15:15 yesterday
But it's easy to change with an option.
$ ls -l --time-style='+%F %T'
total 0
-rw------- 1 paddy paddy 0 2020-12-22 02:34:16 last-week
-rw------- 1 paddy paddy 0 2019-02-03 18:06:14 last-year
-rw------- 1 paddy paddy 0 2020-03-12 09:16:30 march
-rw------- 1 paddy paddy 0 2020-12-29 10:05:00 today
-rw------- 1 paddy paddy 0 2020-12-28 15:15:00 yesterday
Nautilus, however, doesn't seem to have an option to change the format. Here is my display in Nautilus for the same files.
287647
Having mixed formats makes it extremely hard to compare dates.
After some searching, I came across only three solutions.
Change the source code and recompile Nautilus. This is out of my depth, and anyway it'll be overwritten when there's an update.
Don't use Nautilus. Use something else. Well, I suppose that's an option, but I don't like this. Not only am I very used to Nautilus (I've used it since I first upgraded to Linux), but also I have a few Nautilus scripts that I'd prefer to keep.
An outdated solution from Ask Ubuntu (https://askubuntu.com/a/1018026/2088). Unfortunately, this doesn't work for me. Given the error messages displayed in the terminal when running Nautilus, I suspect that it's to do with a deprecated command in an old version of Python. As I don't know Python at all (I know Bash and nothing else), this is not something that I can debug.
Do you know how I can use a fixed-format date? I'd like something easy to read, specifically YYYY-MM-DD HH:MM:SS.
More information:
Ubuntu 20.04
Gnome 3.36.8
Nautilus 3.36.3-stable
Thank you
Normally, these apps give an option to format dates. For example, the default listing for ls is a bit of a mishmash as follows.
$ ls -l
total 0
-rw------- 1 paddy paddy 0 Dec 22 02:34 last-week
-rw------- 1 paddy paddy 0 Feb 3 2019 last-year
-rw------- 1 paddy paddy 0 Mar 12 2020 march
-rw------- 1 paddy paddy 0 Dec 29 10:05 today
-rw------- 1 paddy paddy 0 Dec 28 15:15 yesterday
But it's easy to change with an option.
$ ls -l --time-style='+%F %T'
total 0
-rw------- 1 paddy paddy 0 2020-12-22 02:34:16 last-week
-rw------- 1 paddy paddy 0 2019-02-03 18:06:14 last-year
-rw------- 1 paddy paddy 0 2020-03-12 09:16:30 march
-rw------- 1 paddy paddy 0 2020-12-29 10:05:00 today
-rw------- 1 paddy paddy 0 2020-12-28 15:15:00 yesterday
Nautilus, however, doesn't seem to have an option to change the format. Here is my display in Nautilus for the same files.
287647
Having mixed formats makes it extremely hard to compare dates.
After some searching, I came across only three solutions.
Change the source code and recompile Nautilus. This is out of my depth, and anyway it'll be overwritten when there's an update.
Don't use Nautilus. Use something else. Well, I suppose that's an option, but I don't like this. Not only am I very used to Nautilus (I've used it since I first upgraded to Linux), but also I have a few Nautilus scripts that I'd prefer to keep.
An outdated solution from Ask Ubuntu (https://askubuntu.com/a/1018026/2088). Unfortunately, this doesn't work for me. Given the error messages displayed in the terminal when running Nautilus, I suspect that it's to do with a deprecated command in an old version of Python. As I don't know Python at all (I know Bash and nothing else), this is not something that I can debug.
Do you know how I can use a fixed-format date? I'd like something easy to read, specifically YYYY-MM-DD HH:MM:SS.
More information:
Ubuntu 20.04
Gnome 3.36.8
Nautilus 3.36.3-stable
Thank you