| 1 |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1. |
| 2 |
.TH DATE "1" "February 2026" "GNU coreutils 9.10" "User Commands" |
| 3 |
.\" Define monospaced roman font for groff in troff mode. |
| 4 |
.if t .if \n(.g \{\ |
| 5 |
. ds mono \f(CR |
| 6 |
. ds /mono \fP |
| 7 |
.\} |
| 8 |
.SH NAME |
| 9 |
date \- print or set the system date and time |
| 10 |
.SH SYNOPSIS |
| 11 |
.B date |
| 12 |
[\fI\,OPTION\/\fR]... [\fB+\fR\fI\,FORMAT\/\fR] |
| 13 |
.br |
| 14 |
.B date |
| 15 |
[\fI\,OPTION\/\fR]... \ |
| 16 |
\fIMMDDhhmm\/\fR[[\fI\,CC\/\fR]\fI\,YY\/\fR][\fB.\fI\,ss\/\fR] |
| 17 |
.SH DESCRIPTION |
| 18 |
.\" Add any additional description here |
| 19 |
.PP |
| 20 |
Display date and time in the given FORMAT. |
| 21 |
With \fB\-s\fR, or with MMDDhhmm[[CC]YY][.ss], set the date and time first. |
| 22 |
.PP |
| 23 |
Mandatory arguments to long options are mandatory for short options too. |
| 24 |
.TP |
| 25 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-d'\fB\-d, \-\-date=\,STRING\fP\X'tty: link'\/\fR |
| 26 |
display time described by STRING, not 'now' |
| 27 |
.TP |
| 28 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date--debug'\fB\-\-debug\fP\X'tty: link' |
| 29 |
annotate the parsed date, |
| 30 |
and warn about questionable usage to standard error |
| 31 |
.TP |
| 32 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-f'\fB\-f, \-\-file=\,DATEFILE\fP\X'tty: link'\/\fR |
| 33 |
like \fB\-\-date\fR; once for each line of DATEFILE; |
| 34 |
if DATEFILE is \-, read names from standard input |
| 35 |
.TP |
| 36 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-I'\fB\-I[FMT], \-\-iso\-8601[=\,FMT]\fP\X'tty: link'\/\fR |
| 37 |
output date/time in ISO 8601 format. |
| 38 |
FMT='date' (default), 'hours', 'minutes', 'seconds', or 'ns' |
| 39 |
for date and time to the indicated precision. |
| 40 |
Example: 2006\-08\-14T02:34:56\-06:00 |
| 41 |
.TP |
| 42 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date--resolution'\fB\-\-resolution\fP\X'tty: link' |
| 43 |
output the available resolution of timestamps. |
| 44 |
Example: 0.000000001 |
| 45 |
.TP |
| 46 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-R'\fB\-R, \-\-rfc\-email\fP\X'tty: link' |
| 47 |
output date and time in RFC 5322 format. |
| 48 |
Example: Mon, 14 Aug 2006 02:34:56 +0000 |
| 49 |
.TP |
| 50 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date--rfc-3339'\fB\-\-rfc\-3339=FMT\fP\X'tty: link' |
| 51 |
output date/time in RFC 3339 format. |
| 52 |
FMT='date', 'seconds', or 'ns' |
| 53 |
for date and time to the indicated precision. |
| 54 |
Example: 2006\-08\-14 02:34:56\-06:00 |
| 55 |
.TP |
| 56 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-r'\fB\-r, \-\-reference=\,FILE\fP\X'tty: link'\/\fR |
| 57 |
display the last modification time of FILE |
| 58 |
.TP |
| 59 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-s'\fB\-s, \-\-set=\,STRING\fP\X'tty: link'\/\fR |
| 60 |
set time described by STRING |
| 61 |
.TP |
| 62 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-u'\fB\-u, \-\-utc, \-\-universal\fP\X'tty: link' |
| 63 |
print or set Coordinated Universal Time (UTC) |
| 64 |
.TP |
| 65 |
\X'tty: link https://www.gnu.org/software/coreutils/date#date--help'\fB\-\-help\fP\X'tty: link' |
| 66 |
display this help and exit |
| 67 |
.TP |
| 68 |
\X'tty: link https://www.gnu.org/software/coreutils/date#date--version'\fB\-\-version\fP\X'tty: link' |
| 69 |
output version information and exit |
| 70 |
.PP |
| 71 |
All options that specify the date to display are mutually exclusive. |
| 72 |
I.e.: \fB\-\-date\fR, \fB\-\-file\fR, \fB\-\-reference\fR, \fB\-\-resolution\fR. |
| 73 |
.PP |
| 74 |
FORMAT controls the output. Interpreted sequences are: |
| 75 |
.TP |
| 76 |
%% |
| 77 |
a literal % |
| 78 |
.TP |
| 79 |
%a |
| 80 |
locale's abbreviated weekday name (e.g., Sun) |
| 81 |
.TP |
| 82 |
%A |
| 83 |
locale's full weekday name (e.g., Sunday) |
| 84 |
.TP |
| 85 |
%b |
| 86 |
locale's abbreviated month name (e.g., Jan) |
| 87 |
.TP |
| 88 |
%B |
| 89 |
locale's full month name (e.g., January) |
| 90 |
.TP |
| 91 |
%c |
| 92 |
locale's date and time (e.g., Thu Mar 3 23:05:25 2005) |
| 93 |
.TP |
| 94 |
%C |
| 95 |
century; like %Y, except omit last two digits (e.g., 20) |
| 96 |
.TP |
| 97 |
%d |
| 98 |
day of month (e.g., 01) |
| 99 |
.TP |
| 100 |
%D |
| 101 |
date (ambiguous); same as %m/%d/%y |
| 102 |
.TP |
| 103 |
%e |
| 104 |
day of month, space padded; same as %_d |
| 105 |
.TP |
| 106 |
%F |
| 107 |
full date; like %+4Y\-%m\-%d |
| 108 |
.TP |
| 109 |
%g |
| 110 |
last two digits of year of ISO week number (ambiguous; 00\-99); see %G |
| 111 |
.TP |
| 112 |
%G |
| 113 |
year of ISO week number; normally useful only with %V |
| 114 |
.TP |
| 115 |
%h |
| 116 |
same as %b |
| 117 |
.TP |
| 118 |
%H |
| 119 |
hour (00..23) |
| 120 |
.TP |
| 121 |
%I |
| 122 |
hour (01..12) |
| 123 |
.TP |
| 124 |
%j |
| 125 |
day of year (001..366) |
| 126 |
.TP |
| 127 |
%k |
| 128 |
hour, space padded ( 0..23); same as %_H |
| 129 |
.TP |
| 130 |
%l |
| 131 |
hour, space padded ( 1..12); same as %_I |
| 132 |
.TP |
| 133 |
%m |
| 134 |
month (01..12) |
| 135 |
.TP |
| 136 |
%M |
| 137 |
minute (00..59) |
| 138 |
.TP |
| 139 |
%n |
| 140 |
a newline |
| 141 |
.TP |
| 142 |
%N |
| 143 |
nanoseconds (000000000..999999999) |
| 144 |
.TP |
| 145 |
%p |
| 146 |
locale's equivalent of either AM or PM; blank if not known |
| 147 |
.TP |
| 148 |
%P |
| 149 |
like %p, but lower case |
| 150 |
.TP |
| 151 |
%q |
| 152 |
quarter of year (1..4) |
| 153 |
.TP |
| 154 |
%r |
| 155 |
locale's 12\-hour clock time (e.g., 11:11:04 PM) |
| 156 |
.TP |
| 157 |
%R |
| 158 |
24\-hour hour and minute; same as %H:%M |
| 159 |
.TP |
| 160 |
%s |
| 161 |
seconds since the Epoch (1970\-01\-01 00:00 UTC) |
| 162 |
.TP |
| 163 |
%S |
| 164 |
second (00..60) |
| 165 |
.TP |
| 166 |
%t |
| 167 |
a tab |
| 168 |
.TP |
| 169 |
%T |
| 170 |
time; same as %H:%M:%S |
| 171 |
.TP |
| 172 |
%u |
| 173 |
day of week (1..7); 1 is Monday |
| 174 |
.TP |
| 175 |
%U |
| 176 |
week number of year, with Sunday as first day of week (00..53) |
| 177 |
.TP |
| 178 |
%V |
| 179 |
ISO week number, with Monday as first day of week (01..53) |
| 180 |
.TP |
| 181 |
%w |
| 182 |
day of week (0..6); 0 is Sunday |
| 183 |
.TP |
| 184 |
%W |
| 185 |
week number of year, with Monday as first day of week (00..53) |
| 186 |
.TP |
| 187 |
%x |
| 188 |
locale's date (can be ambiguous; e.g., 12/31/99) |
| 189 |
.TP |
| 190 |
%X |
| 191 |
locale's time representation (e.g., 23:13:48) |
| 192 |
.TP |
| 193 |
%y |
| 194 |
last two digits of year (ambiguous; 00..99) |
| 195 |
.TP |
| 196 |
%Y |
| 197 |
year |
| 198 |
.TP |
| 199 |
%z |
| 200 |
+hhmm numeric time zone (e.g., \fB\-0400\fR) |
| 201 |
.TP |
| 202 |
%:z |
| 203 |
+hh:mm numeric time zone (e.g., \fB\-04\fR:00) |
| 204 |
.TP |
| 205 |
%::z |
| 206 |
+hh:mm:ss numeric time zone (e.g., \fB\-04\fR:00:00) |
| 207 |
.TP |
| 208 |
%:::z |
| 209 |
numeric time zone with : to necessary precision (e.g., \fB\-04\fR, +05:30) |
| 210 |
.TP |
| 211 |
%Z |
| 212 |
alphabetic time zone abbreviation (e.g., EDT) |
| 213 |
.PP |
| 214 |
By default, date pads numeric fields with zeroes. |
| 215 |
The following optional flags may follow '%': |
| 216 |
.TP |
| 217 |
\- |
| 218 |
(hyphen) do not pad the field |
| 219 |
.TP |
| 220 |
_ |
| 221 |
(underscore) pad with spaces |
| 222 |
.TP |
| 223 |
0 |
| 224 |
(zero) pad with zeros |
| 225 |
.TP |
| 226 |
+ |
| 227 |
pad with zeros, and put '+' before future years with >4 digits |
| 228 |
.TP |
| 229 |
^ |
| 230 |
use upper case if possible |
| 231 |
.TP |
| 232 |
# |
| 233 |
use opposite case if possible |
| 234 |
.PP |
| 235 |
After any flags comes an optional field width, as a decimal number; |
| 236 |
then an optional modifier, which is either |
| 237 |
E to use the locale's alternate representations if available, or |
| 238 |
O to use the locale's alternate numeric symbols if available. |
| 239 |
.SH EXAMPLES |
| 240 |
Convert seconds since the Epoch (1970\-01\-01 UTC) to a date |
| 241 |
.IP |
| 242 |
\*[mono]$ date --date='@2147483647'\*[/mono] |
| 243 |
.PP |
| 244 |
Show the time on the west coast of the US (use \fBtzselect\fP(1) to find TZ) |
| 245 |
.IP |
| 246 |
\*[mono]$ TZ='America/Los_Angeles' date\*[/mono] |
| 247 |
.PP |
| 248 |
Show the local time for 9AM next Friday on the west coast of the US |
| 249 |
.IP |
| 250 |
\*[mono]$ date --date='TZ="America/Los_Angeles" 09:00 next Fri'\*[/mono] |
| 251 |
.SH "DATE STRING" |
| 252 |
.\" NOTE: keep this paragraph in sync with the one in touch.x |
| 253 |
The --date=STRING is a mostly free format human readable date string |
| 254 |
such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or |
| 255 |
even "next Thursday". A date string may contain items indicating |
| 256 |
calendar date, time of day, time zone, day of week, relative time, |
| 257 |
relative date, and numbers. An empty string indicates the beginning |
| 258 |
of the day. The date string format is more complex than is easily |
| 259 |
documented here but is fully described in the info documentation. |
| 260 |
.SH AUTHOR |
| 261 |
Written by David MacKenzie. |
| 262 |
.SH "REPORTING BUGS" |
| 263 |
Report bugs to: bug\[email protected] |
| 264 |
.br |
| 265 |
GNU coreutils home page: <https://www.gnu.org/software/coreutils/> |
| 266 |
.br |
| 267 |
General help using GNU software: <https://www.gnu.org/gethelp/> |
| 268 |
.br |
| 269 |
Report any translation bugs to <https://translationproject.org/team/> |
| 270 |
.SH "SEE ALSO" |
| 271 |
Full documentation <https://www.gnu.org/software/coreutils/date> |
| 272 |
.br |
| 273 |
or available locally via: info \(aq(coreutils) date invocation\(aq |
| 274 |
.PP |
| 275 |
.br |
| 276 |
Packaged by Debian (9.10\-1) |
| 277 |
.br |
| 278 |
Copyright \(co 2026 Free Software Foundation, Inc. |
| 279 |
.br |
| 280 |
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. |
| 281 |
.br |
| 282 |
This is free software: you are free to change and redistribute it. |
| 283 |
.br |
| 284 |
There is NO WARRANTY, to the extent permitted by law. |