Bug 4820

Summary: date reports [[[[[YY]YY]MM]DD]hh]mm[.ss] support, but doesn't always provide it
Product: Busybox Reporter: james
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.19.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description james 2012-02-29 06:42:11 UTC
date's usage help reports [[[[[YY]YY]MM]DD]hh]mm[.ss] support, even if CONFIG_FEATURE_DATE_COMPAT has turned this into MMDDhhmmYYYY.ss support.
Seems like a bit of a dangerous feature to begin with imho...
Comment 1 Denys Vlasenko 2012-03-01 07:36:01 UTC
How about this?

Usage: date [OPTIONS] [+FMT] [TIME]

Display time (using +FMT), or set time

        [-s,--set] TIME Set time to TIME
        -u,--utc        Work in UTC (don't convert to local time)
        -R,--rfc-2822   Output RFC-2822 compliant date string
        -I[SPEC]        Output ISO-8601 compliant date string
                        SPEC='date' (default) for date only,
                        'hours', 'minutes', or 'seconds' for date and
                        time to the indicated precision
        -r,--reference FILE     Display last modification time of FILE
        -d,--date TIME  Display TIME, not 'now'
        -D FMT          Use FMT for -d TIME conversion

Recognized TIME formats:
        hh:mm[:ss]
        [YYYY.]MM.DD-hh:mm[:ss]
        YYYY-MM-DD hh:mm[:ss]
        [[[[[YY]YY]MM]DD]hh]mm[.ss]
        'date TIME' form accepts MMDDhhmm[[YY]YY][.ss] instead
Comment 2 james 2012-03-01 07:52:46 UTC
Looks good.
Comment 3 Denys Vlasenko 2012-03-01 09:56:46 UTC
Fixed in git