date date DATE TIME
This command operates one of two modes. When invoked with no
arguments, it prints the current date and time. When invoked
with both date
and time
arguments, it sets the
current time.
The date
is specified in YYYY-MM-DD
format.
The time
is specified in HH:MM:SS
format.
This command returns 0 on success and non-zero if an error is encountered.
This comm
The following is an example of how to use date
:
SHLL [/] $ date Fri Jan 1 00:00:09 1988 SHLL [/] $ date 2008-02-29 06:45:32 SHLL [/] $ date Fri Feb 29 06:45:35 2008
This command is included in the default shell command set.
When building a custom command set, define
CONFIGURE_SHELL_COMMAND_DATE
to have this
command included.
This command can be excluded from the shell command set by
defining CONFIGURE_SHELL_NO_COMMAND_DATE
when all
shell commands have been configured.
The date
is implemented by a C language function
which has the following prototype:
int rtems_shell_rtems_main_date( int argc, char **argv );
The configuration structure for the date
has the
following prototype:
extern rtems_shell_cmd_t rtems_shell_DATE_Command;
Copyright © 1988-2008 OAR Corporation