//config: touch is used to create or change the access and/or
//config: modification timestamp of specified files.
-//applet:IF_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_DROP, touch))
+//applet:IF_TOUCH(APPLET_NOFORK(touch, touch, BB_DIR_BIN, BB_SUID_DROP, touch))
//kbuild:lib-$(CONFIG_TOUCH) += touch.o
//usage: "[-c]" IF_DESKTOP(" [-d DATE] [-r FILE]") " FILE [FILE]..."
//usage:#define touch_full_usage "\n\n"
//usage: "Update the last-modified date on the given FILE[s]\n"
-//usage: "\nOptions:"
//usage: "\n -c Don't create files"
//usage: IF_DESKTOP(
//usage: "\n -d DT Date/time to use"
struct tm tm_time;
time_t t;
- //time(&t);
- //localtime_r(&t, &tm_time);
- memset(&tm_time, 0, sizeof(tm_time));
+ //memset(&tm_time, 0, sizeof(tm_time));
+ /* Better than memset: makes "HH:MM" dates meaningful */
+ time(&t);
+ localtime_r(&t, &tm_time);
parse_datestr(date_str, &tm_time);
/* Correct any day of week and day of year etc. fields */