OSDN Git Service

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