1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
2 .TH DATE "1" "March 2012" "GNU coreutils 8.16" "User Commands"
4 date \- print or set the system date and time
7 [\fIOPTION\fR]... [\fI+FORMAT\fR]
10 [\fI-u|--utc|--universal\fR] [\fIMMDDhhmm\fR[[\fICC\fR]\fIYY\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 \fB\-d\fR, \fB\-\-date\fR=\fISTRING\fR
17 display time described by STRING, not 'now'
19 \fB\-f\fR, \fB\-\-file\fR=\fIDATEFILE\fR
20 like \fB\-\-date\fR once for each line of DATEFILE
22 \fB\-I[TIMESPEC]\fR, \fB\-\-iso\-8601\fR[=\fITIMESPEC\fR]
23 output date/time in ISO 8601 format.
24 TIMESPEC='date' for date only (the default),
25 \&'hours', 'minutes', 'seconds', or 'ns' for date
26 and time to the indicated precision.
28 \fB\-r\fR, \fB\-\-reference\fR=\fIFILE\fR
29 display the last modification time of FILE
31 \fB\-R\fR, \fB\-\-rfc\-2822\fR
32 output date and time in RFC 2822 format.
33 Example: Mon, 07 Aug 2006 12:34:56 \fB\-0600\fR
35 \fB\-\-rfc\-3339\fR=\fITIMESPEC\fR
36 output date and time in RFC 3339 format.
37 TIMESPEC='date', 'seconds', or 'ns' for
38 date and time to the indicated precision.
39 Date and time components are separated by
40 a single space: 2006\-08\-07 12:34:56\-06:00
42 \fB\-s\fR, \fB\-\-set\fR=\fISTRING\fR
43 set time described by STRING
45 \fB\-u\fR, \fB\-\-utc\fR, \fB\-\-universal\fR
46 print or set Coordinated Universal Time
49 display this help and exit
52 output version information and exit
54 FORMAT controls the output. Interpreted sequences are:
60 locale's abbreviated weekday name (e.g., Sun)
63 locale's full weekday name (e.g., Sunday)
66 locale's abbreviated month name (e.g., Jan)
69 locale's full month name (e.g., January)
72 locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
75 century; like %Y, except omit last two digits (e.g., 20)
78 day of month (e.g., 01)
81 date; same as %m/%d/%y
84 day of month, space padded; same as %_d
87 full date; same as %Y\-%m\-%d
90 last two digits of year of ISO week number (see %G)
93 year of ISO week number (see %V); normally useful only with %V
105 day of year (001..366)
108 hour, space padded ( 0..23); same as %_H
111 hour, space padded ( 1..12); same as %_I
123 nanoseconds (000000000..999999999)
126 locale's equivalent of either AM or PM; blank if not known
129 like %p, but lower case
132 locale's 12\-hour clock time (e.g., 11:11:04 PM)
135 24\-hour hour and minute; same as %H:%M
138 seconds since 1970\-01\-01 00:00:00 UTC
147 time; same as %H:%M:%S
150 day of week (1..7); 1 is Monday
153 week number of year, with Sunday as first day of week (00..53)
156 ISO week number, with Monday as first day of week (01..53)
159 day of week (0..6); 0 is Sunday
162 week number of year, with Monday as first day of week (00..53)
165 locale's date representation (e.g., 12/31/99)
168 locale's time representation (e.g., 23:13:48)
171 last two digits of year (00..99)
177 +hhmm numeric time zone (e.g., \fB\-0400\fR)
180 +hh:mm numeric time zone (e.g., \fB\-04\fR:00)
183 +hh:mm:ss numeric time zone (e.g., \fB\-04\fR:00:00)
186 numeric time zone with : to necessary precision (e.g., \fB\-04\fR, +05:30)
189 alphabetic time zone abbreviation (e.g., EDT)
191 By default, date pads numeric fields with zeroes.
192 The following optional flags may follow '%':
195 (hyphen) do not pad the field
198 (underscore) pad with spaces
201 (zero) pad with zeros
204 use upper case if possible
207 use opposite case if possible
209 After any flags comes an optional field width, as a decimal number;
210 then an optional modifier, which is either
211 E to use the locale's alternate representations if available, or
212 O to use the locale's alternate numeric symbols if available.
214 Convert seconds since the epoch (1970\-01\-01 UTC) to a date
216 \f(CW$ date --date='@2147483647'\fR
218 Show the time on the west coast of the US (use tzselect(1) to find TZ)
220 \f(CW$ TZ='America/Los_Angeles' date\fR
222 Show the local time for 9AM next Friday on the west coast of the US
224 \f(CW$ date --date='TZ="America/Los_Angeles" 09:00 next Fri'\fR
226 .\" NOTE: keep this paragraph in sync with the one in touch.x
227 The --date=STRING is a mostly free format human readable date string
228 such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or
229 even "next Thursday". A date string may contain items indicating
230 calendar date, time of day, time zone, day of week, relative time,
231 relative date, and numbers. An empty string indicates the beginning
232 of the day. The date string format is more complex than is easily
233 documented here but is fully described in the info documentation.
235 Written by David MacKenzie.
237 Report date bugs to bug\-coreutils@gnu.org
239 GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
241 General help using GNU software: <http://www.gnu.org/gethelp/>
243 Report date translation bugs to <http://translationproject.org/team/>
245 Copyright \(co 2012 Free Software Foundation, Inc.
246 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
248 This is free software: you are free to change and redistribute it.
249 There is NO WARRANTY, to the extent permitted by law.
251 The full documentation for
253 is maintained as a Texinfo manual. If the
257 programs are properly installed at your site, the command
259 .B info coreutils \(aqdate invocation\(aq
261 should give you access to the complete manual.