DATE

Section: User Commands (1)
Index Return to Main Contents
 

NAME

date - write the date and time  

SYNOPSIS

date [ -u ] [ +format ]  

DESCRIPTION

Date writes the current date and time to the standard output. It is intended to be compliant with the Posix 1003.2 Command Language and Utilities standard. Therefore, it is purposely not usable by the super-user for setting the system time.

Date accepts one option:

-u
Perform operations as if the TZ environment variable was set to GMT0.

If an argument to date is given that begins with a ``+'', then the output is controlled by the contents of the rest of the string. Normal text is output unmodified, while field descriptors in the format string are substituted for.

The date program is essentially a wrapper around strftime(3); see there for a description of the available formatting options.

If no format string is given, or if it does not begin with a ``+'', then the default format of "%a %b %e %H:%M:%S %Z %Y" will be used. This produces the traditional style of output, such as ``Sun Mar 17 10:32:47 EST 1991''.  

SEE ALSO

time(2), strftime(3), localtime(3)  

BUGS

This version only works for the POSIX locale.  

AUTHOR

Arnold Robbins <arnold@skeeve.com>


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 11:02:15 GMT, January 03, 2023