mirror of
https://github.com/sheumann/hush.git
synced 2024-12-27 16:31:24 +00:00
libbb: better comment in parse_date
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
ad3d72f082
commit
10ee20b58b
@ -91,7 +91,13 @@ void FAST_FUNC parse_datestr(const char *date_str, struct tm *ptm)
|
|||||||
* .SS Seconds, a number from 0 to 61 (with leap seconds)
|
* .SS Seconds, a number from 0 to 61 (with leap seconds)
|
||||||
* Everything but the minutes is optional
|
* Everything but the minutes is optional
|
||||||
*
|
*
|
||||||
* This coincides with the format of "touch -t TIME"
|
* "touch -t DATETIME" format: [[[[[YY]YY]MM]DD]hh]mm[.ss]
|
||||||
|
* Some, but not all, Unix "date DATETIME" commands
|
||||||
|
* move [[YY]YY] past minutes mm field (!).
|
||||||
|
* Coreutils date does it, and SUS mandates it.
|
||||||
|
* (date -s DATETIME does not support this format. lovely!)
|
||||||
|
* In bbox, this format is special-cased in date applet
|
||||||
|
* (IOW: this function assumes "touch -t" format).
|
||||||
*/
|
*/
|
||||||
unsigned cur_year = ptm->tm_year;
|
unsigned cur_year = ptm->tm_year;
|
||||||
int len = strchrnul(date_str, '.') - date_str;
|
int len = strchrnul(date_str, '.') - date_str;
|
||||||
|
Loading…
Reference in New Issue
Block a user