RTEMS Logo

RTEMS 4.9.5 On-Line Library


General Commands date - print or set current date and time

PREV UP NEXT Bookshelf RTEMS Shell User's Guide

2.2.2: date - print or set current date and time

SYNOPSYS:

date
date DATE TIME

DESCRIPTION:

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.

EXIT STATUS:

This command returns 0 on success and non-zero if an error is encountered.

NOTES:

This comm

EXAMPLES:

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

CONFIGURATION:

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.

PROGRAMMING INFORMATION:

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;


PREV UP NEXT Bookshelf RTEMS Shell User's Guide

Copyright © 1988-2008 OAR Corporation