Bug 4820 - date reports [[[[[YY]YY]MM]DD]hh]mm[.ss] support, but doesn't always provide it
Summary: date reports [[[[[YY]YY]MM]DD]hh]mm[.ss] support, but doesn't always provide it
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.19.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 06:42 UTC by james
Modified: 2012-03-01 09:56 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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