On Sunday 26 July 2009 13:22, Cristian Ionescu-Idbohrn wrote:
> ,----
> | Author: Denys Vlasenko <[email protected]>
> | Date:   Sat Jul 18 04:54:21 2009 +0200
> |
> |     correct date testsuite to use compatible format
> |
> |     Signed-off-by: Denys Vlasenko <[email protected]>
> `----
> 
> 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
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to