386BSD 0.1 development
[unix-history] / usr / othersrc / public / shellutils-1.6 / man / cat1 / date.0
CommitLineData
ee7d659d
WJ
1
2
3
4DATE(1L) DATE(1L)
5
6
7N\bNA\bAM\bME\bE
8 date - print or set the system date and time
9
10S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
11 d\bda\bat\bte\be [-u] [-s new-date] [+FORMAT] [MMDDhhmm[[CC]YY][.ss]]
12
13D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
14 This manual page documents the GNU version of d\bda\bat\bte\be. d\bda\bat\bte\be
15 with no arguments prints the current time and date (in the
16 format of the `%c' directive described below). If given
17 an argument that starts with a `+', it prints the current
18 time and date in a format controlled by that argument,
19 which has the same format as the format string passed to
20 the `strftime' function. Except for directives that start
21 with `%', characters in that string are printed unchanged.
22
23 The directives are:
24
25 % a literal %
26
27 n a newline
28
29 t a horizontal tab
30
31 Time fields:
32
33 %H hour (00..23)
34
35 %I hour (00..12)
36
37 %M minute (00..59)
38
39 %p locale's AM or PM
40
41 %r time, 12-hour (hh:mm:ss [AP]M)
42
43 %S second (00..61)
44
45 %T time, 24-hour (hh:mm:ss)
46
47 %X locale's time representation (%H:%M:%S)
48
49 %Z time zone (e.g., EDT), or nothing if no time zone
50 is determinable
51
52 Date fields:
53
54 %a locale's abbreviated weekday name (Sun..Sat)
55
56 %A locale's full weekday name, variable length (Sun-
57 day..Saturday)
58
59 %b locale's abbreviated month name (Jan..Dec)
60
61
62
63
64 1
65
66
67
68
69
70DATE(1L) DATE(1L)
71
72
73 %B locale's full month name, variable length (Jan-
74 uary..December)
75
76 %c locale's date and time (Sat Nov 04 12:02:33 EST
77 1989)
78
79 %d day of month (01..31)
80
81 %D date (mm/dd/yy)
82
83 %h same as %b
84
85 %j day of year (001..366)
86
87 %m month (01..12)
88
89 %U week number of year with Sunday as first day of
90 week (00..53)
91
92 %w day of week (0..6)
93
94 %W week number of year with Monday as first day of
95 week (00..53)
96
97 %x locale's date representation (mm/dd/yy)
98
99 %y last two digits of year (00..99)
100
101 %Y year (1970...)
102
103 If given an argument that does not start with `+', d\bda\bat\bte\be
104 sets the system clock to the time and date specified by
105 that argument. The argument must consist entirely of dig-
106 its, which have the following meaning:
107
108 MM month
109
110 DD day within month
111
112 hh hour
113
114 mm minute
115
116 CC first two digits of year (optional)
117
118 YY last two digits of year (optional)
119
120 ss second (optional)
121
122 Only the superuser can set the system clock.
123
124 O\bOP\bPT\bTI\bIO\bON\bNS\bS
125 -_\bs _\bn_\be_\bw-_\bd_\ba_\bt_\be
126 Set the time and date to _\bn_\be_\bw-_\bd_\ba_\bt_\be, which can be in
127
128
129
130 2
131
132
133
134
135
136DATE(1L) DATE(1L)
137
138
139 almost any common format. It can contain month
140 names, timezones, `am' and `pm', etc.
141
142 -_\bu Print or set the time and date in Universal Coordi-
143 nated Time (also known as Greenwich Mean Time)
144 instead of in local (wall clock) time.
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196 3
197
198