aboutsummaryrefslogtreecommitdiff
path: root/coreutils/touch.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/touch.c')
-rw-r--r--coreutils/touch.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 1b4a5f0ea..e79092fc1 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -64,10 +64,14 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_DESKTOP && ENABLE_LONG_OPTS
applet_long_options = touch_longopts;
#endif
- opts = getopt32(argv, "c" IF_DESKTOP("r:d:")
+ /* -d and -t both set time. In coreutils,
+ * accepted data format differs a bit between -d and -t.
+ * We accept the same formats for both */
+ opts = getopt32(argv, "c" IF_DESKTOP("r:d:t:")
/*ignored:*/ "fma"
IF_DESKTOP(, &reference_file)
IF_DESKTOP(, &date_str)
+ IF_DESKTOP(, &date_str)
);
opts &= 1; /* only -c bit is left */