OSDN Git Service

coreutils: Update original to 8.32
[linuxjm/jm.git] / manual / GNU_coreutils / original / man1 / date.1
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"
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 the current time in the given FORMAT, or set the system date.
15 .PP
16 Mandatory arguments to long options are mandatory for short options too.
17 .TP
18 \fB\-d\fR, \fB\-\-date\fR=\fI\,STRING\/\fR
19 display time described by STRING, not 'now'
20 .TP
21 \fB\-\-debug\fR
22 annotate the parsed date,
23 and warn about questionable usage to stderr
24 .TP
25 \fB\-f\fR, \fB\-\-file\fR=\fI\,DATEFILE\/\fR
26 like \fB\-\-date\fR; once for each line of DATEFILE
27 .TP
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
34 .TP
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
38 .TP
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
44 .TP
45 \fB\-r\fR, \fB\-\-reference\fR=\fI\,FILE\/\fR
46 display the last modification time of FILE
47 .TP
48 \fB\-s\fR, \fB\-\-set\fR=\fI\,STRING\/\fR
49 set time described by STRING
50 .TP
51 \fB\-u\fR, \fB\-\-utc\fR, \fB\-\-universal\fR
52 print or set Coordinated Universal Time (UTC)
53 .TP
54 \fB\-\-help\fR
55 display this help and exit
56 .TP
57 \fB\-\-version\fR
58 output version information and exit
59 .PP
60 FORMAT controls the output.  Interpreted sequences are:
61 .TP
62 %%
63 a literal %
64 .TP
65 %a
66 locale's abbreviated weekday name (e.g., Sun)
67 .TP
68 %A
69 locale's full weekday name (e.g., Sunday)
70 .TP
71 %b
72 locale's abbreviated month name (e.g., Jan)
73 .TP
74 %B
75 locale's full month name (e.g., January)
76 .TP
77 %c
78 locale's date and time (e.g., Thu Mar  3 23:05:25 2005)
79 .TP
80 %C
81 century; like %Y, except omit last two digits (e.g., 20)
82 .TP
83 %d
84 day of month (e.g., 01)
85 .TP
86 %D
87 date; same as %m/%d/%y
88 .TP
89 %e
90 day of month, space padded; same as %_d
91 .TP
92 %F
93 full date; like %+4Y\-%m\-%d
94 .TP
95 %g
96 last two digits of year of ISO week number (see %G)
97 .TP
98 %G
99 year of ISO week number (see %V); normally useful only with %V
100 .TP
101 %h
102 same as %b
103 .TP
104 %H
105 hour (00..23)
106 .TP
107 %I
108 hour (01..12)
109 .TP
110 %j
111 day of year (001..366)
112 .TP
113 %k
114 hour, space padded ( 0..23); same as %_H
115 .TP
116 %l
117 hour, space padded ( 1..12); same as %_I
118 .TP
119 %m
120 month (01..12)
121 .TP
122 %M
123 minute (00..59)
124 .TP
125 %n
126 a newline
127 .TP
128 %N
129 nanoseconds (000000000..999999999)
130 .TP
131 %p
132 locale's equivalent of either AM or PM; blank if not known
133 .TP
134 %P
135 like %p, but lower case
136 .TP
137 %q
138 quarter of year (1..4)
139 .TP
140 %r
141 locale's 12\-hour clock time (e.g., 11:11:04 PM)
142 .TP
143 %R
144 24\-hour hour and minute; same as %H:%M
145 .TP
146 %s
147 seconds since 1970\-01\-01 00:00:00 UTC
148 .TP
149 %S
150 second (00..60)
151 .TP
152 %t
153 a tab
154 .TP
155 %T
156 time; same as %H:%M:%S
157 .TP
158 %u
159 day of week (1..7); 1 is Monday
160 .TP
161 %U
162 week number of year, with Sunday as first day of week (00..53)
163 .TP
164 %V
165 ISO week number, with Monday as first day of week (01..53)
166 .TP
167 %w
168 day of week (0..6); 0 is Sunday
169 .TP
170 %W
171 week number of year, with Monday as first day of week (00..53)
172 .TP
173 %x
174 locale's date representation (e.g., 12/31/99)
175 .TP
176 %X
177 locale's time representation (e.g., 23:13:48)
178 .TP
179 %y
180 last two digits of year (00..99)
181 .TP
182 %Y
183 year
184 .TP
185 %z
186 +hhmm numeric time zone (e.g., \fB\-0400\fR)
187 .TP
188 %:z
189 +hh:mm numeric time zone (e.g., \fB\-04\fR:00)
190 .TP
191 %::z
192 +hh:mm:ss numeric time zone (e.g., \fB\-04\fR:00:00)
193 .TP
194 %:::z
195 numeric time zone with : to necessary precision (e.g., \fB\-04\fR, +05:30)
196 .TP
197 %Z
198 alphabetic time zone abbreviation (e.g., EDT)
199 .PP
200 By default, date pads numeric fields with zeroes.
201 The following optional flags may follow '%':
202 .TP
203 \-
204 (hyphen) do not pad the field
205 .TP
206 _
207 (underscore) pad with spaces
208 .TP
209 0
210 (zero) pad with zeros
211 .TP
212 +
213 pad with zeros, and put '+' before future years with >4 digits
214 .TP
215 ^
216 use upper case if possible
217 .TP
218 #
219 use opposite case if possible
220 .PP
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.
225 .SH EXAMPLES
226 Convert seconds since the epoch (1970\-01\-01 UTC) to a date
227 .IP
228 \f(CW$ date --date='@2147483647'\fR
229 .PP
230 Show the time on the west coast of the US (use tzselect(1) to find TZ)
231 .IP
232 \f(CW$ TZ='America/Los_Angeles' date\fR
233 .PP
234 Show the local time for 9AM next Friday on the west coast of the US
235 .IP
236 \f(CW$ date --date='TZ="America/Los_Angeles" 09:00 next Fri'\fR
237 .SH "DATE STRING"
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.
246 .SH AUTHOR
247 Written by David MacKenzie.
248 .SH "REPORTING BUGS"
249 GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
250 .br
251 Report any translation bugs to <https://translationproject.org/team/>
252 .SH COPYRIGHT
253 Copyright \(co 2020 Free Software Foundation, Inc.
254 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
255 .br
256 This is free software: you are free to change and redistribute it.
257 There is NO WARRANTY, to the extent permitted by law.
258 .SH "SEE ALSO"
259 Full documentation <https://www.gnu.org/software/coreutils/date>
260 .br
261 or available locally via: info \(aq(coreutils) date invocation\(aq