- Display the current date using the default locale's format:date +"%c"- Display the current date in UTC and ISO 8601 format:date -u +"%Y-%m-%dT%H:%M:%SZ"- Display the current date as a Unix timestamp (seconds since the Unix epoch):date +%s- Display a specific date (represented as a Unix timestamp) using the default format:date -d @1473305798
date [,OPTION/]... [,+FORMAT/] date [,-u|--utc|--universal/] [,MMDDhhmm/[[,CC/],YY/][,.ss/]]
Display the current time in the given FORMAT, or set the system date.
Mandatory arguments to long options are mandatory for short options too.
FORMAT controls the output. Interpreted sequences are:
By default, date pads numeric fields with zeroes. The following optional flags may follow '%':
After any flags comes an optional field width, as a decimal number; then an optional modifier, which is either E to use the locale's alternate representations if available, or O to use the locale's alternate numeric symbols if available.
Convert seconds since the epoch (1970-01-01 UTC) to a date
Show the time on the west coast of the US (use tzselect(1) to find TZ)
Show the local time for 9AM next Friday on the west coast of the US
The --date=STRING is a mostly free format human readable date string such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday". A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indicates the beginning of the day. The date string format is more complex than is easily documented here but is fully described in the info documentation.
Written by David MacKenzie.
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report date translation bugs to <http://translationproject.org/team/>
Copyright © 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Full documentation at: <http://www.gnu.org/software/coreutils/date> or available locally via: info '(coreutils) date invocation'