OSDN Git Service

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