diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-01-17 14:23:42 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-01-17 14:23:42 +0100 |
commit | 10ee20b58b77bdfb941480fdf4b95347c2b2ea79 (patch) | |
tree | d1d36427d955a638f6e20f45ef16bc8fb8d22044 | |
parent | ad3d72f082cbdb152837ae87d1d285cbbf67913a (diff) | |
download | busybox-w32-10ee20b58b77bdfb941480fdf4b95347c2b2ea79.tar.gz busybox-w32-10ee20b58b77bdfb941480fdf4b95347c2b2ea79.tar.bz2 busybox-w32-10ee20b58b77bdfb941480fdf4b95347c2b2ea79.zip |
libbb: better comment in parse_date
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-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; |