bad commit 941990f0c5911cccd2bfaa3e0259a312c93f97ef?

Denys Vlasenko vda.linux at googlemail.com
Sun Jul 26 11:52:55 UTC 2009


On Sunday 26 July 2009 13:22, Cristian Ionescu-Idbohrn wrote:
> ,----
> | Author: Denys Vlasenko <vda.linux at googlemail.com>
> | Date:   Sat Jul 18 04:54:21 2009 +0200
> |
> |     correct date testsuite to use compatible format
> |
> |     Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
> `----
> 
> Documentation says:
> 
> ,----
> | Recognized formats for TIME:
> |         hh:mm[:ss]
> |         [YYYY.]MM.DD-hh:mm[:ss]
> |         YYYY-MM-DD hh:mm[:ss]
> |         MMDDhhmm[[YY]YY][.ss]
> `----

Documentation was changed, IIRC in the same commit, to say
[[[[[YY]YY]MM]DD]hh]mm[.ss] instead of MMDDhhmm[[YY]YY][.ss]:

# ./busybox date --help
BusyBox v1.15.0.svn (2009-07-26 13:45:10 CEST) multi-call binary

Usage: date [OPTIONS] [+FMT] [TIME]
...
Recognized formats for TIME:
        hh:mm[:ss]
        [YYYY.]MM.DD-hh:mm[:ss]
        YYYY-MM-DD hh:mm[:ss]
        [[[[[YY]YY]MM]DD]hh]mm[.ss]

(It seems that MMDDhhmm[[YY]YY][.ss] format was a bbox invention,
because it's slightly easier to parse. Google didn't show any
other programs which use such format. See a comment in libbb/time.c)

> -dt=`busybox date -d 012311332000`
> +dt=`busybox date -d 200001231133`
> 
> TIME format: YYYYMMDDhhmm[.ss] does not seem to be supported.

Just checked current git:

# ./busybox date -d 200001231133
Sun Jan 23 11:33:00 CET 2000
# TZ=UTC0 ./busybox date -d 200001231133
Sun Jan 23 11:33:00 UTC 2000
# cd testsuite
# ./runtest date
PASS: date-R-works
PASS: date-format-works
PASS: date-u-works
PASS: date-works
PASS: date-works-1

--
vda


More information about the busybox mailing list