commands

date — Format dates and times

Displays date/time. GNU -d accepts a specified input; -u displays UTC; +FORMAT controls presentation. -s changes the system clock and is not part of this lab. Use a fresh private workspace; live operations are VM-only.

Formal Syntax & Structure

linux syntaxlinux
date [OPTION]... [+FORMAT]

Parameters & Attributes

NameTypeDescription
-doptionParse input date
-uoptionUse UTC
FORMAToperandOutput format

Return Value

exit status and output

Displays date/time. GNU -d accepts a specified input; -u displays UTC; +FORMAT controls presentation. -s changes the system clock and is not part of this lab.

Working Example

Example Snippetlinux
date -u -d '@0' '+%F'
Linux Reference