date: introduce FEATURE_DATE_COMPAT; shrink

function                                             old     new   delta
date_main                                            889     862     -27

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2010-01-23 23:37:52 +01:00
parent dfd38a480b
commit 5da9f96ad8
2 changed files with 41 additions and 34 deletions

View File

@@ -115,6 +115,22 @@ config FEATURE_DATE_ISOFMT
Enable option (-I) to output an ISO-8601 compliant
date/time string.
config FEATURE_DATE_COMPAT
bool "Support weird 'date MMDDhhmm[[YY]YY][.ss]' format"
default y
depends on DATE
help
System time can be set by 'date -s DATE' and simply 'date DATE',
but formats of DATE string are different. 'date DATE' accepts
a rather weird MMDDhhmm[[YY]YY][.ss] format with completely
unnatural placement of year between minutes and seconds.
date -s (and other commands like touch -d) use more sensible
formats (for one, ISO format YYYY-MM-DD hh:mm:ss.ssssss).
With this option off, 'date DATE' is 'date -s DATE' support
the same format. With it on, 'date DATE' additionally supports
MMDDhhmm[[YY]YY][.ss] format.
config DD
bool "dd"
default n