2009-05-17 by Arthur David Olson.
1 Sat Mar 8 14:54:40 EST 2025
with EST replaced by the local time zone's abbreviation (or by the abbreviation for the time zone specified in the TZ environment variable if set). The exact output format depends on the locale.
If a command-line argument starts with a plus sign (\c .q "+" ), the rest of the argument is used as a format that is processed by strftime (3) to determine what to output; a newline character is appended. For example, the shell command:
1 date +"%Y-%m-%d %H:%M:%S %z"
outputs a line like .q "2025-03-08 14:54:40 -0500" instead.
These options are available:
-u " or " -c Use Universal Time when setting and showing the date and time.
"-r " seconds Output the date that corresponds to seconds past the epoch of 1970-01-01 00:00:00 UTC, where seconds should be an integer, either decimal, octal (leading 0), or hexadecimal (leading 0x), preceded by an optional sign.
/usr/lib/locale/\f2L/LC_TIME description of time locale \f2L
/usr/share/zoneinfo timezone directory
/usr/share/zoneinfo/Etc/UTC for UTC leap seconds