touch: implement -t TIME (needed for testsuite)
This changes date -d TIME format a bit, makes it more compatible function old new delta parse_datestr 391 618 +227 touch_main 360 361 +1 packed_usage 26624 26615 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
7aca89a7a3
commit
38dd8aa657
3 changed files with 91 additions and 20 deletions
|
@ -668,6 +668,7 @@
|
|||
#define date_full_usage "\n\n" \
|
||||
"Display time (using +FMT), or set time\n" \
|
||||
"\nOptions:" \
|
||||
"\n [-s] TIME Set time to TIME" \
|
||||
"\n -u Work in UTC (don't convert to local time)" \
|
||||
"\n -R Output RFC-822 compliant date string" \
|
||||
IF_FEATURE_DATE_ISOFMT( \
|
||||
|
@ -676,18 +677,17 @@
|
|||
"\n 'hours', 'minutes', or 'seconds' for date and" \
|
||||
"\n time to the indicated precision" \
|
||||
) \
|
||||
"\n -d TIME Display TIME, not 'now'" \
|
||||
"\n -r FILE Display last modification time of FILE" \
|
||||
"\n [-s] TIME Set time to TIME" \
|
||||
"\n -d TIME Display TIME, not 'now'" \
|
||||
IF_FEATURE_DATE_ISOFMT( \
|
||||
"\n -D FMT Use FMT for str->date conversion" \
|
||||
"\n -D FMT Use FMT for -d TIME conversion" \
|
||||
) \
|
||||
"\n" \
|
||||
"\nRecognized formats for TIME:" \
|
||||
"\n hh:mm[:ss]" \
|
||||
"\n [YYYY.]MM.DD-hh:mm[:ss]" \
|
||||
"\n YYYY-MM-DD hh:mm[:ss]" \
|
||||
"\n MMDDhhmm[[YY]YY][.ss]" \
|
||||
"\n [[[[[YY]YY]MM]DD]hh]mm[.ss]" \
|
||||
|
||||
#define date_example_usage \
|
||||
"$ date\n" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue