[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: man date
Re: man date
Mon, 18 Mar 2002 21:48:58 -0700
Thank your for your report. It is most appreciated. However what you
have seen is not a bug but normal program behavior.
> in date's manual page i read:
> -s, --set=STRING
> but i could change the date only with:
> date -s22:00:00 +%T
> why the equal sign if?
It is not clear to me exactly what you are asking. The -s and --set
options take a string argument. The format of the string argument is
very flexible and can be in many formats including your 22:00:00
example. But probably the format most expect is either mail rfc
format such as "date --set='Mon, 25 Mar 1996 23:34:17 -0600'" or some
other such mostly human readable format. The formats are documented
in the 'info date' online documentation in the 'Date input formats'
section of the manual.
The -s / --set options are useful GNU extensions. The traditional
date command only reads packed decimal format 'MMDDhhmm[[CC]YY][.ss]'
which means something like "date 032523341996.17" for the above
example. I think most agree that while computers read that last well
humans read the first example better.
The = sign is an optional part of long named options such as --set.
You can either use --set=STRING or --set STRING as is your choice.
> i could also read "FORMAT controls the output". If FORMAT option is has
> no sense with -s option, and i use it nevetheless i wish to see a
> warning or error.
I did not try it, but probably a +format option in conjunction with
--set should probably at least generate a warning. The date command
is becoming a very complicated command.
- man date, suigres, 2002/03/17
- Re: man date,
Bob Proulx <=