coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

`touch -d"2022-05-15 +01 month" 01.ts` isn't supported

Open sylvestre opened this issue 3 years ago • 4 comments
trafficstars

Should return:

-rw-r--r-- 1 sylvestre sylvestre 0 15 juin   2022 01.ts

Currently fails with:

touch: Unable to parse date: 2022-05-15 +01 month

Used by gnu/tests/ls/abmon-align.sh

sylvestre avatar May 08 '22 19:05 sylvestre

looking into this one

dgunay avatar May 20 '22 01:05 dgunay

The full documentation on every format that GNU supports is here: https://www.gnu.org/software/coreutils/manual/html_node/Date-input-formats.html

In particular, the part that this issue is about is: https://www.gnu.org/software/coreutils/manual/html_node/Relative-items-in-date-strings.html

I suggest that we implement this in uucore (if we can't find an existing library) so that it can be used in multiple utils.

tertsdiepraam avatar May 21 '22 07:05 tertsdiepraam

I suggest that we implement this in uucore (if we can't find an existing library) so that it can be used in multiple utils.

Or in a crate base on time or chrono which could be used by other projects too :)

sylvestre avatar May 21 '22 08:05 sylvestre

Agreed!

tertsdiepraam avatar May 21 '22 08:05 tertsdiepraam