DATE(1)
๐ date(1) โ she's from the User Commands chapter and she is, frankly, iconic ๐
okay so bestie, welcome to date(1). Yes, the manual name is literally User Commands, yes it's giving "boring reference page", but trust โ this one runs the entire clock of your whole machine. Let's get into it. ๐ฐ๏ธโจ
๐ NAME ๐
date โ print or set the system date and time. That's it. That's the whole job description. Slay. ๐
๐ธ SYNOPSIS ๐ธ
date [OPTION]... [+FORMAT]
date [OPTION]... MMDDhhmm[[CC]YY][.ss]
๐ฆ DESCRIPTION ๐ฆ
So here's the tea: date displays the date and time in whatever FORMAT you hand it. And if you pass -s, or you do the whole MMDDhhmm[[CC]YY][.ss] thing, it sets the date and time first, then shows you. main character behaviour, honestly. ๐
lowkey important: mandatory arguments to long options are mandatory for short options too. no exceptions, no cap. ๐ค
-d,--date=STRINGโ show the time thatSTRINGdescribes, not'now'. it's giving "time traveler" ๐ฆ--debugโ annotate the parsed date, and warn about questionable usage to standard error. it's the friend who narrates your life and also side-eyes your choices. ๐-f,--file=DATEFILEโ exactly like--date, except once for each line ofDATEFILE. and ifDATEFILEis-, 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โ show the last modification time ofFILE. detective mode activated ๐-s,--set=STRINGโ set the time described bySTRING. you're literally rewriting time rn โณ-u,--utc,--universalโ print or set Coordinated Universal Time (UTC). the planet-wide group chat ๐--helpโ display this help and exit--versionโ output version information and exit
โ ๏ธ bestie watch out: all options that specify the date to display are mutually exclusive. I.e.:--date,--file,--reference,--resolution. pick ONE. you cannot have all four. choose your fighter. ๐
๐ฎ FORMAT โ the part where the magic happens ๐ฎ
FORMAT controls the output. Here are all the interpreted sequences, no skips, no cuts:
%%โ a literal%%aโ locale's abbreviated weekday name (e.g.,Sun)%Aโ locale's full weekday name (e.g.,Sunday)%bโ locale's abbreviated month name (e.g.,Jan)%Bโ locale's full month name (e.g.,January)%cโ locale's date and time (e.g.,Thu Mar 3 23:05:25 2005)%Cโ century; like%Y, except omit last two digits (e.g.,20)%dโ day of month (e.g.,01)%Dโ date (ambiguous); same as%m/%d/%y%eโ day of month, space padded; same as%_d%Fโ full date; like%+4Y-%m-%d%gโ last two digits of year of ISO week number (ambiguous;00-99); see%G%Gโ year of ISO week number; normally useful only with%V%hโ same as%b%Hโ hour (00..23)%Iโ hour (01..12)%jโ day of year (001..366)%kโ hour, space padded (0..23); same as%_H%lโ hour, space padded (1..12); same as%_I%mโ month (01..12)%Mโ minute (00..59)%nโ a newline%Nโ nanoseconds (000000000..999999999)%pโ locale's equivalent of either AM or PM; blank if not known%Pโ like%p, but lower case%qโ quarter of year (1..4)%rโ locale's 12-hour clock time (e.g.,11:11:04 PM)%Rโ 24-hour hour and minute; same as%H:%M%sโ seconds since the Epoch (1970-01-01 00:00 UTC)%Sโ second (00..60)%tโ a tab%Tโ time; same as%H:%M:%S%uโ day of week (1..7);1is Monday%Uโ week number of year, with Sunday as first day of week (00..53)%Vโ ISO week number, with Monday as first day of week (01..53)%wโ day of week (0..6);0is Sunday%Wโ week number of year, with Monday as first day of week (00..53)%xโ locale's date (can be ambiguous; e.g.,12/31/99)%Xโ locale's time representation (e.g.,23:13:48)%yโ last two digits of year (ambiguous;00..99)%Yโ year%zโ+hhmmnumeric time zone (e.g.,-0400)%:zโ+hh:mmnumeric time zone (e.g.,-04:00)%::zโ+hh:mm:ssnumeric time zone (e.g.,-04:00:00)%:::zโ numeric time zone with:to necessary precision (e.g.,-04,+05:30)%Zโ alphabetic time zone abbreviation (e.g.,EDT)
โจ the little flags that follow % โจ
by default, date pads numeric fields with zeroes. and these optional flags may follow %, bestie:
-โ (hyphen) do not pad the field_โ (underscore) pad with spaces0โ (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
then, after any flags, comes an optional field width, as a decimal number; and 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. ๐ง la carte du jour, but for time.
๐ 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 โ like "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday". it literally understands "next Thursday". she's fluent. ๐ฃ๏ธ๐
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. ๐
ngl, the date string format is more complex than is easily documented here, but it is fully described in the info documentation. go read it, iykyk. ๐
๐ AUTHOR ๐
Written by David MacKenzie. legend behaviour, honestly. ๐ซถ
๐ญ REPORTING BUGS ๐ญ
- Report bugs to:
bug-coreutils@gnu.org - GNU coreutils home page:
https://www.gnu.org/software/coreutils/ - General help using GNU software:
https://www.gnu.org/gethelp/ - Report any translation bugs to
https://translationproject.org/team/
like pls tell them, they wanna know, they're so normal about it ๐
๐ SEE ALSO ๐
- Full documentation:
https://www.gnu.org/software/coreutils/date - or available locally via:
info '(coreutils) date invocation' - Packaged by Ubuntu (
9.10-1ubuntu2) - 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. ๐ญ
okay that's the whole page, you made it, I'm so proud of you ๐๐ธ
this was GNU coreutils 9.10, from August 2026 โ shoutout to date(1) for never once being late. she's never beating the punctual allegations. โฐ๐โจ
๐ฆ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms