---
name: "date"
section: "1"
platform: "linux"
package: "coreutils"
version: "9.12-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/date"
---

# date(1)

print or set the system date and time

## NAME

date - print or set the system date and time

## SYNOPSIS

**date** \[*OPTION*\]... \[**+***FORMAT*\]\
 **date** \[*OPTION*\]... *MMDDhhmm*\[\[*CC*\]*YY*\]\[**.***ss*\]

## DESCRIPTION

Display date and time in the given FORMAT. With **-s**, or with MMDDhhmm\[\[CC\]YY\]\[.ss\], set the date and time first.

Mandatory arguments to long options are mandatory for short options too.

- **-d, --date=STRING**

  display time described by STRING, not 'now'

- **--debug**

  annotate the parsed date, and warn about questionable usage to standard error

- **-f, --file=DATEFILE**

  like **--date**; once for each line of DATEFILE; if DATEFILE is -, read names from standard input

- **-I\[FMT\], --iso-8601\[=FMT\]**

  output date/time in ISO 8601 format. FMT='date' (default), 'hours', 'minutes', 'seconds', or 'ns' for date and time to the indicated precision. Example: 2006-08-14T02:34:56-06:00

- **--resolution**

  output the available resolution of timestamps. Example: 0.000000001

- **-R, --rfc-email**

  output date and time in RFC 5322 format. Example: Mon, 14 Aug 2006 02:34:56 +0000

- **--rfc-3339=FMT**

  output date/time in RFC 3339 format. FMT='date', 'seconds', or 'ns' for date and time to the indicated precision. Example: 2006-08-14 02:34:56-06:00

- **-r, --reference=FILE**

  display the last modification time of FILE

- **-s, --set=STRING**

  set time described by STRING

- **-u, --utc, --universal**

  print or set Coordinated Universal Time (UTC)

- **--help**

  display this help and exit

- **--version**

  output version information and exit

All options that specify the date to display are mutually exclusive. I.e.: **--date**, **--file**, **--reference**, **--resolution**.

FORMAT controls the output.  Interpreted sequences are:

FORMAT  Example    Description

- %%

  %           a literal %

- %n

  \\n          a newline

- %t

  \\t          a tab

- %C

  20          century; like %Y, except omit last two digits

- %y

  99          year (last two digits; 00..99)

- %Y

  1999        year

- %g

  99          year of ISO week number (last 2 digits; 00-99); see %G

- %G

  1999        year of ISO week number; normally useful only with %V

- %a

  Sun         locale's abbreviated weekday name

- %A

  Sunday      locale's full weekday name

- %b

  Mar         locale's abbreviated month name

- %h

  Mar         same as %b

- %B

  March       locale's full month name

- %m

  12          month (01..12)

- %d

  31          day of month (01..31)

- %e

  1          day of month, space padded; same as %\_d

- %D

  12/31/99    date (ambiguous); same as %m/%d/%y

- %F

  1999-12-31  full date; like %+4Y-%m-%d

- %x

  12/31/99    locale's date (can be ambiguous)

- %c

  ...         locale's date and time (e.g., Thu Mar  3 23:05 2005)

- %H

  23          hour (00..23)

- %I

  01          hour (01..12)

- %k

  8          hour, space padded ( 0..23); same as %\_H

- %l

  9          hour, space padded ( 1..12); same as %\_I

- %M

  59          minute (00..59)

- %S

  60          second (00..60)

- %N

  123456789   nanoseconds (000000000..999999999)

- %s

  1970010100  seconds since the Epoch (1970-01-01 00:00 UTC)

- %p

  PM          locale's equivalent of AM or PM; blank if not known

- %P

  am          like %p, but lower case

- %r

  1:11:04 PM  locale's 12-hour clock time

- %R

  23:59       24-hour hour and minute; same as %H:%M

- %T

  23:59:59    time; same as %H:%M:%S

- %X

  23:59:59    locale's time representation

- %j

  365         day of year (001..366)

- %q

  4           quarter of year (1..4)

- %u

  7           day of week (1..7); 1 is Monday

- %w

  6           day of week (0..6); 0 is Sunday

- %U

  52          week of year; Sunday as first day of week (00..53)

- %V

  52          ISO week number; Monday as first day of week (01..53)

- %W

  52          week of year; Monday as first day of week (00..53)

- %z

  \+0400      +hhmm numeric time zone

- %:z

  \+04:00     +hh:mm numeric time zone

- %::z

  \+04:00:00  +hh:mm:ss numeric time zone

- %:::z

  \+04        numeric time zone to necessary precision; with :

- %Z

  EDT        alphabetic time zone abbreviation

By default, date pads numeric fields with zeroes. The following optional flags may follow '%':

- \-

  (hyphen) do not pad the field

- \_

  (underscore) pad with spaces

- 0

  (zero) pad with zeros

- \+

  pad with zeros, and put '+' before future years with \>4 digits

- ^

  use upper case if possible

- \#

  use opposite case if possible

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.

## EXAMPLES

Convert seconds since the Epoch (1970-01-01 UTC) to a date

-

  $ date --date='@2147483647'

**Show the time on the west coast of the US (use [tzselect(1)](/tzselect/1.md) to find TZ)**

-

  **$ TZ='America/Los\_Angeles' date**

**Show the local time for 9AM next Friday on the west coast of the US**

-

  **$ date --date='TZ="America/Los\_Angeles" 09:00 next Fri'**

## DATE STRING

**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.**

## AUTHOR

**Written by David MacKenzie.**

## REPORTING BUGS

**Report bugs to: \<bug-coreutils@gnu.org\>.**\
 **Report any translation bugs to: \<https://translationproject.org/team/\>.**\
 **GNU coreutils home page: \<https://www.gnu.org/software/coreutils/\>**\
 **General help using GNU software: \<https://www.gnu.org/gethelp/\>**

## COPYRIGHT

**Copyright © 2026 Free Software Foundation, Inc.** **License GPLv3+: GNU GPL version 3 or later \<https://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.**

## SEE ALSO

**Full documentation \<https://www.gnu.org/software/coreutils/date\>**\
 **or available locally via: info '(coreutils) date invocation'**
