Hours in Properties > General use RATIO UTF-8 Unicode character instead of regular colon
Affected version
- Nightly flatpak: Couldn't test (low bandwidth connection, end of data plan, flatpak platform is too big)
- Other: Arch Linux x64 - GNOME nautilus 41.2 - GNOME Terminal 3.42.2 using VTE 0.66.2 +BIDI +GNUTLS +ICU +SYSTEMD
Steps to reproduce
- Open Properties dialog for any file
- Select and copy Last Access/Mod hour with Ctrl+C
- Open Terminal and try to
touch -d
any file with the pasted hour as argument Result:touch: invalid date format
- Press ↑ to bring back the command, delete the colons then put them back with the keyboard
- Press Enter and now the command succeeds.
Here is a copy of the two strings, the first with the "wrong colon":
touch -d "16∶31∶00" test
touch: format de date « 16∶31∶00 » incorrect
Second with manually corrected one:
touch -d "16:31:00" test
Interestingly if we add LANG=C
it displays the Unicode original (I guess?):
LANG=C touch -d "16∶31∶00" test
touch: invalid date format '16\342\210\26631\342\210\26600'
This is not limited to touch
. I first noticed it with the --date=
argument to git commands, thinking it was a bug with git I reported it to the mailing list in 2015, and it is Jeff King who discovered the "RATIO Unicode code point" thing. The story even made the Git Rev newsletter which still contains an example with the wrong character.
The result is that in git commit --date
for example, year/month/day/timezone are correctly parsed and applied if supplied, but the hours/minutes/seconds are not and this result in a kind of "soft failure" barely noticeable:
mkdir nautilus-wrong-colon
cd !$
git init
touch -d "2015-05-21 16:31 +0200" test
git add .
## open Properties dialog and copy Last Access/Mod, here pasted after date="")
git commit -am "Wrong hour" --date="21 mai 2015 16∶31∶00"
[main (commit racine) cbbdaba] Wrong hour
Date: Sat Mar 21 19:34:38 2015 +0100
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test
Notice the hour doesn't match and is instead system current time. Now I go back and delete/replace the colons:
git commit -am "Wrong hour" --date="21 mai 2015 16:31:00" --amend
[main 03715f0] Wrong hour
Date: Sat Mar 21 16:31:00 2015 +0100
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test
Hour is correctly parsed and applied.
Current behavior
Properties > General file Last Access/Mod/Create times use RATIO Unicode code point instead of regular colon
Expected behavior
Use regular colon allowing copy paste in other programs taking free form date inputs.
Additional information
Wayland session, Clipboard indicator extension used but it also happens when disabled.
Tell me if you need any other debug info.