1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
2 .TH DATE "1" "March 2020" "GNU coreutils 8.32" "User Commands"
4 date \- print or set the system date and time
7 [\fI\,OPTION\/\fR]... [\fI\,+FORMAT\/\fR]
10 [\fI\,-u|--utc|--universal\/\fR] [\fI\,MMDDhhmm\/\fR[[\fI\,CC\/\fR]\fI\,YY\/\fR][\fI\,.ss\/\fR]]
12 .\" Add any additional description here
14 Display the current time in the given FORMAT, or set the system date.
16 Mandatory arguments to long options are mandatory for short options too.
18 \fB\-d\fR, \fB\-\-date\fR=\fI\,STRING\/\fR
19 display time described by STRING, not 'now'
22 annotate the parsed date,
23 and warn about questionable usage to stderr
25 \fB\-f\fR, \fB\-\-file\fR=\fI\,DATEFILE\/\fR
26 like \fB\-\-date\fR; once for each line of DATEFILE
28 \fB\-I[FMT]\fR, \fB\-\-iso\-8601\fR[=\fI\,FMT\/\fR]
29 output date/time in ISO 8601 format.
30 FMT='date' for date only (the default),
31 \&'hours', 'minutes', 'seconds', or 'ns'
32 for date and time to the indicated precision.
33 Example: 2006\-08\-14T02:34:56\-06:00
35 \fB\-R\fR, \fB\-\-rfc\-email\fR
36 output date and time in RFC 5322 format.
37 Example: Mon, 14 Aug 2006 02:34:56 \fB\-0600\fR
39 \fB\-\-rfc\-3339\fR=\fI\,FMT\/\fR
40 output date/time in RFC 3339 format.
41 FMT='date', 'seconds', or 'ns'
42 for date and time to the indicated precision.
43 Example: 2006\-08\-14 02:34:56\-06:00
45 \fB\-r\fR, \fB\-\-reference\fR=\fI\,FILE\/\fR
46 display the last modification time of FILE
48 \fB\-s\fR, \fB\-\-set\fR=\fI\,STRING\/\fR
49 set time described by STRING
51 \fB\-u\fR, \fB\-\-utc\fR, \fB\-\-universal\fR
52 print or set Coordinated Universal Time (UTC)
55 display this help and exit
58 output version information and exit
60 FORMAT controls the output. Interpreted sequences are:
66 locale's abbreviated weekday name (e.g., Sun)
69 locale's full weekday name (e.g., Sunday)
72 locale's abbreviated month name (e.g., Jan)
75 locale's full month name (e.g., January)
78 locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
81 century; like %Y, except omit last two digits (e.g., 20)
84 day of month (e.g., 01)
87 date; same as %m/%d/%y
90 day of month, space padded; same as %_d
93 full date; like %+4Y\-%m\-%d
96 last two digits of year of ISO week number (see %G)
99 year of ISO week number (see %V); normally useful only with %V
111 day of year (001..366)
114 hour, space padded ( 0..23); same as %_H
117 hour, space padded ( 1..12); same as %_I
129 nanoseconds (000000000..999999999)
132 locale's equivalent of either AM or PM; blank if not known
135 like %p, but lower case
138 quarter of year (1..4)
141 locale's 12\-hour clock time (e.g., 11:11:04 PM)
144 24\-hour hour and minute; same as %H:%M
147 seconds since 1970\-01\-01 00:00:00 UTC
156 time; same as %H:%M:%S
159 day of week (1..7); 1 is Monday
162 week number of year, with Sunday as first day of week (00..53)
165 ISO week number, with Monday as first day of week (01..53)
168 day of week (0..6); 0 is Sunday
171 week number of year, with Monday as first day of week (00..53)
174 locale's date representation (e.g., 12/31/99)
177 locale's time representation (e.g., 23:13:48)
180 last two digits of year (00..99)
186 +hhmm numeric time zone (e.g., \fB\-0400\fR)
189 +hh:mm numeric time zone (e.g., \fB\-04\fR:00)
192 +hh:mm:ss numeric time zone (e.g., \fB\-04\fR:00:00)
195 numeric time zone with : to necessary precision (e.g., \fB\-04\fR, +05:30)
198 alphabetic time zone abbreviation (e.g., EDT)
200 By default, date pads numeric fields with zeroes.
201 The following optional flags may follow '%':
204 (hyphen) do not pad the field
207 (underscore) pad with spaces
210 (zero) pad with zeros
213 pad with zeros, and put '+' before future years with >4 digits
216 use upper case if possible
219 use opposite case if possible
221 After any flags comes an optional field width, as a decimal number;
222 then an optional modifier, which is either
223 E to use the locale's alternate representations if available, or
224 O to use the locale's alternate numeric symbols if available.
226 Convert seconds since the epoch (1970\-01\-01 UTC) to a date
228 \f(CW$ date --date='@2147483647'\fR
230 Show the time on the west coast of the US (use tzselect(1) to find TZ)
232 \f(CW$ TZ='America/Los_Angeles' date\fR
234 Show the local time for 9AM next Friday on the west coast of the US
236 \f(CW$ date --date='TZ="America/Los_Angeles" 09:00 next Fri'\fR
238 .\" NOTE: keep this paragraph in sync with the one in touch.x
239 The --date=STRING is a mostly free format human readable date string
240 such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or
241 even "next Thursday". A date string may contain items indicating
242 calendar date, time of day, time zone, day of week, relative time,
243 relative date, and numbers. An empty string indicates the beginning
244 of the day. The date string format is more complex than is easily
245 documented here but is fully described in the info documentation.
247 Written by David MacKenzie.
249 GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
251 Report any translation bugs to <https://translationproject.org/team/>
253 Copyright \(co 2020 Free Software Foundation, Inc.
254 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
256 This is free software: you are free to change and redistribute it.
257 There is NO WARRANTY, to the extent permitted by law.
259 Full documentation <https://www.gnu.org/software/coreutils/date>
261 or available locally via: info \(aq(coreutils) date invocation\(aq