diff options
-rw-r--r-- | libbb/time.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libbb/time.c b/libbb/time.c index 1eb2d75c2..e2b938471 100644 --- a/libbb/time.c +++ b/libbb/time.c | |||
@@ -91,7 +91,13 @@ void FAST_FUNC parse_datestr(const char *date_str, struct tm *ptm) | |||
91 | * .SS Seconds, a number from 0 to 61 (with leap seconds) | 91 | * .SS Seconds, a number from 0 to 61 (with leap seconds) |
92 | * Everything but the minutes is optional | 92 | * Everything but the minutes is optional |
93 | * | 93 | * |
94 | * This coincides with the format of "touch -t TIME" | 94 | * "touch -t DATETIME" format: [[[[[YY]YY]MM]DD]hh]mm[.ss] |
95 | * Some, but not all, Unix "date DATETIME" commands | ||
96 | * move [[YY]YY] past minutes mm field (!). | ||
97 | * Coreutils date does it, and SUS mandates it. | ||
98 | * (date -s DATETIME does not support this format. lovely!) | ||
99 | * In bbox, this format is special-cased in date applet | ||
100 | * (IOW: this function assumes "touch -t" format). | ||
95 | */ | 101 | */ |
96 | unsigned cur_year = ptm->tm_year; | 102 | unsigned cur_year = ptm->tm_year; |
97 | int len = strchrnul(date_str, '.') - date_str; | 103 | int len = strchrnul(date_str, '.') - date_str; |