DATE(1)

πŸ“¦ version 0.12.0, in arch rolling

✨ NAME ✨

okay so bestie, welcome to date(1) β€” manual name date(1), the β€œPrint or set the system date and time” icon πŸ‘‘. That’s literally the whole job: peek at the clock or set it, and this page is your group chat with all the deets.

πŸ¦‹ SYNOPSIS πŸ¦‹

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

FORMAT controls the output. Interpreted sequences are β€” yes, all of them, we are not skipping a single one πŸ’…:

  • %% β€” a literal % (example: %) πŸ’–
  • %a β€” locale’s abbreviated weekday name (example: Sun) 🌸
  • %A β€” locale’s full weekday name (example: Sunday) 🌈
  • %b β€” locale’s abbreviated month name (example: Jan) πŸŽ€
  • %B β€” locale’s full month name (example: January) πŸ¦‹
  • %c β€” locale’s date and time (example: Thu Mar 3 23:05:25 2005) ⭐
  • %C β€” century; like %Y, except omit last two digits (example: 20) πŸ’œ
  • %d β€” day of month (example: 01) πŸ’…
  • %D β€” date; same as %m/%d/%y (example: 12/31/99) ✨
  • %e β€” day of month, space padded; same as %_d (example: 3) 🫢
  • %F β€” full date; same as %Y-%m-%d (example: 2005-03-03) πŸ’–
  • %g β€” last two digits of year of ISO week number (see %G) (example: 05) 🌟
  • %G β€” year of ISO week number (see %V); normally useful only with %V (example: 2005) πŸ‘‘
  • %h β€” same as %b (example: Jan) πŸŽ€
  • %H β€” hour (00..23) (example: 23) πŸ•°οΈ
  • %I β€” hour (01..12) (example: 11) ⏰
  • %j β€” day of year (001..366) (example: 062) πŸ“
  • %k β€” hour, space padded ( 0..23); same as %_H (example: 3) 🌸
  • %l β€” hour, space padded ( 1..12); same as %_I (example: 9) πŸ’«
  • %m β€” month (01..12) (example: 03) πŸ’œ
  • %M β€” minute (00..59) (example: 30) πŸ’…
  • %n β€” a newline (example: \n) πŸ¦‹
  • %N β€” nanoseconds (000000000..999999999) (example: 123456789) ⚑
  • %p β€” locale’s equivalent of either AM or PM; blank if not known (example: PM) 🌸
  • %P β€” like %p, but lower case (example: pm) πŸŽ€
  • %q β€” quarter of year (1..4) (example: 1) 🌈
  • %r β€” locale’s 12-hour clock time (example: 11:11:04 PM) ⏱️
  • %R β€” 24-hour hour and minute; same as %H:%M (example: 23:30) πŸ•š
  • %s β€” seconds since 1970-01-01 00:00:00 UTC (example: 1615432800) πŸ”₯
  • %S β€” second (00..60) (example: 30) πŸ’–
  • %t β€” a tab (example: \t) 🫢
  • %T β€” time; same as %H:%M:%S (example: 23:30:30) ⭐
  • %u β€” day of week (1..7); 1 is Monday (example: 4) πŸ’…
  • %U β€” week number of year, with Sunday as first day of week (00..53) (example: 10) 🌸
  • %V β€” ISO week number, with Monday as first day of week (01..53) (example: 12) πŸŽ€
  • %w β€” day of week (0..6); 0 is Sunday (example: 4) πŸ¦‹
  • %W β€” week number of year, with Monday as first day of week (00..53) (example: 11) πŸ’œ
  • %x β€” locale’s date representation (example: 03/03/2005) ✨
  • %X β€” locale’s time representation (example: 23:30:30) ⏰
  • %y β€” last two digits of year (00..99) (example: 05) 🌈
  • %Y β€” year (example: 2005) πŸ‘‘
  • %z β€” +hhmm numeric time zone (example: -0400) πŸ’«
  • %:z β€” +hh:mm numeric time zone (example: -04:00) 🌟
  • %::z β€” +hh:mm:ss numeric time zone (example: -04:00:00) πŸ’–
  • %:::z β€” numeric time zone with : to necessary precision (example: -04, +05:30) 🫢
  • %Z β€” alphabetic time zone abbreviation (example: EDT) 🌸

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 πŸŽ€
  • ^ β€” 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 β€” use the locale’s alternate representations if available ✨
  • O β€” use the locale’s alternate numeric symbols if available 🌈

Examples because we love a demo πŸ’–

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) to find TZ):

TZ='America/Los_Angeles' date

🌸 DESCRIPTION 🌸

Print or set the system date and time. That’s it. That’s the assignment, bestie β€” either check the clock or set it, and the rest of this page is the how πŸ’….

πŸ’… OPTIONS πŸ’…

  • -d, --date <STRING> β€” display time described by STRING, not 'now' ⏰
  • -f, --file <DATEFILE> β€” like --date; once for each line of DATEFILE πŸ“„
  • -I, --iso-8601 [<FMT>] β€” output date/time in ISO 8601 format. FMT='date' for date only (the default), 'hours', 'minutes', 'seconds', or 'ns' for date and time to the indicated precision. Example: 2006-08-14T02:34:56-06:00 🌟
    • Possible values:
      • date
      • hours
      • minutes
      • seconds
      • ns
  • --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 -0600 πŸ“¬
  • --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 πŸ•°οΈ
    • Possible values:
      • date
      • seconds
      • ns
  • --debug β€” annotate the parsed date, and warn about questionable usage to stderr 🚨
  • -r, --reference <FILE> β€” display the last modification time of FILE πŸ“
  • -s, --set <STRING> β€” set time described by STRING ⏳
  • -u, --universal β€” print or set Coordinated Universal Time (UTC) 🌍
  • -h, --help β€” Print help πŸ†˜
  • -V, --version β€” Print version 🏷️
  • [format] β€” the [format] slot at the end, periodt πŸ’…

πŸŽ€ VERSION πŸŽ€

v(uutils coreutils) 0.12.0 β€” that’s the version, bestie ✨.


πŸ’– that’s the whole page, bestie. Signing off with source/version v(uutils coreutils) 0.12.0 and the date 2026-09-17 β€” mwah πŸ’‹

πŸ“¦ where this page comes from