Debian Codegraph @

upstream/opensuse-leap-16-1/man1/date.1

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