touch: parse documented timestamp formats

This commit is contained in:
Nicholas Velten
2026-09-09 10:24:48 +01:00
committed by Nick Craig-Wood
parent ea589de941
commit e45210765c
3 changed files with 54 additions and 11 deletions
+3 -1
View File
@@ -24,9 +24,11 @@ This will touch `--transfers` files concurrently.
If `--timestamp` is used then sets the modification time to that
time instead of the current time. Times may be specified as one of:
- 'YYMMDD' - e.g. 17.10.30
- 'YYMMDD' - e.g. 171030
- 'YYYY-MM-DD' - e.g. 2006-01-02
- 'YYYY-MM-DDTHH:MM:SS' - e.g. 2006-01-02T15:04:05
- 'YYYY-MM-DDTHH:MM:SS.SSS' - e.g. 2006-01-02T15:04:05.123456789
- 'YYYY-MM-DDTHH:MM:SSZ' - e.g. 2006-01-02T15:04:05Z
Note that value of `--timestamp` is in UTC. If you want local time
then add the `--localtime` flag.