DATE(1)
๐ DATE(1) ๐
okay bestie, sit down, hydrate, because we're doing the date page. This one lives in the User Commands part of the manual (section 1, you know the vibe), and it's genuinely one of the most useful little gremlins in your whole toolbox. Let's get into it ๐ซถ
โจ NAME โจ
date โ print or set the system date and time. that's it. that's the whole job. and yet. ๐
๐ธ SYNOPSIS ๐ธ
date [OPTION]... [+FORMAT]
date [OPTION]... MMDDhhmm[[CC]YY][.ss]
๐ฆ DESCRIPTION ๐ฆ
So like โ it displays the date and time in whatever FORMAT you hand it. And if you use -s, or you go the chaotic route and pass MMDDhhmm[[CC]YY][.ss], it sets the date and time first instead. two modes, one legend.
Real talk though: mandatory arguments to long options are mandatory for short options too. no shortcuts on the shortcuts, babes. ๐
๐ OPTIONS ๐
-d,--date=STRINGโ display the time described by STRING, not'now'. so you can be like "no actually, show me a different moment"--debugโ annotates the parsed date, and warns you about questionable usage over on standard error. it's giving "bestie let me check your work" ๐-f,--file=DATEFILEโ like--date, but once for each line of DATEFILE; and if DATEFILE is-, it reads names from standard input. bulk mode, we love efficiency-I[FMT],--iso-8601[=FMT]โ output date/time in ISO 8601 format. FMT can be'date'(that's the default),'hours','minutes','seconds', or'ns'for date and time to the indicated precision. Example:2006-08-14T02:34:56-06:00--resolutionโ outputs 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 is'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 the time described by STRING-u,--utc,--universalโ print or set Coordinated Universal Time (UTC). the one true timezone, sorry to your local clock--helpโ display this help and exit--versionโ output version information and exit
โ ๏ธ okay important: all options that specify the date to display are mutually exclusive. I.e.:--date,--file,--reference,--resolution. pick one. they are not a friend group, they are a "one at a time" situation. ๐ซ
๐ FORMAT ๐
FORMAT controls the output. here are the interpreted sequences, and honestly this list ate:
%%โ%โ 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โ+hhmmnumeric time zone%:zโ+04:00โ+hh:mmnumeric time zone%::zโ+04:00:00โ+hh:mm:ssnumeric 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 spaces0(zero) โ pad with zeros+โ pad with zeros, and put'+'before future years with>4digits^โ 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. that's the whole grammar, you got this ๐ง
๐ฅ 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) 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". no cap, it really does just understand that. 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. (iykyk โ go read the info page, it's the extended cut ๐)
๐ซถ AUTHOR ๐ซถ
Written by David MacKenzie. thank you king ๐
๐ญ 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. (say it with me: no warranty, bestie ๐จ)
โญ SEE ALSO โญ
Full documentation https://www.gnu.org/software/coreutils/date or available locally via: info '(coreutils) date invocation'
okay that's the whole page, you're officially a date girlie now ๐ธ stay hydrated, check your timezones, and remember: this was GNU coreutils 9.12, dated September 2026 โ the DATE(1) era. mwah ๐๐
๐ฆ where this page comes from
- arch rolling: coreutils 9.12-2 ยท GPL-3.0-or-later AND GFDL-1.3-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms