options on date

Denys Vlasenko vda.linux at googlemail.com
Mon Jan 17 13:16:28 UTC 2011


On Mon, Jan 17, 2011 at 12:29 PM, David Collier
<from_busybox_maillist at dexdyne.com> wrote:
> Just a thought...
>
> busybox seems to ignore the -s switch on date.

It doesn't ignore it: date -s DATETIME does set time.

> However - for the separately compiled "date" I looked at, -s switches the
> date format over to something completely different.
>
> so
>
>  date -s "...."
>
>  would work under busybox, but give an error under Linux...

To paraphrase more clearly:

Bbox date treats
date DATETIME
and
date -s DATETIME
essentially the same (except for the MMDDhhmm[[CC]YY][.ss] case,
which is supported only without -s).

Coreutils date supports both formats, but uses different syntaxes
for DATETIME in them.

Why is this a problem?

> even when
>
>  date "same string"
>
>  would actually work fine under Linux
>
> Is there an argument for busybox rejecting the -s option as
> "unimplemented" since we don't implement the data format it implies???

What data format does it imply?

And again, want to clarify: bbox date is more restrictive, and possibly
in some cases incompatible regarding DATETIME formats it accepts.
I think the solution to that is to carefully extend the set of accepted formats.

Tell me which format do you feel bbox date needs to be extended to support?

-- 
vda


More information about the busybox mailing list