3 date \- show and set date and time
21 \fB\-a \fR[\fB+\fR|\fB-]\fIsss\fB.\fIfff\fR
25 \fR[\fIyyyy\fR]\fImmddhhmm\fR[\fIyy\fR][\fB.\fIss\fR]
29 without arguments writes the date and time to the standard output in
32 Wed Mar 8 14:54:40 EST 1989
36 replaced by the local time zone's abbreviation
37 (or by the abbreviation for the time zone specified in the
39 environment variable if set).
40 The exact output format depends on the locale.
42 If a command-line argument starts with a plus sign
44 the rest of the argument is used as a
46 that controls what appears in the output.
47 In the format, when a percent sign
50 it and the character after it are not output,
51 but rather identify part of the date or time
52 to be output in a particular way
53 (or identify a special character to output):
58 .ta \w'%M\0\0'u +\w'Wed Mar 8 14:54:40 EST 1989\0\0'u
59 Sample output Explanation
60 %a Wed Abbreviated weekday name*
61 %A Wednesday Full weekday name*
62 %b Mar Abbreviated month name*
63 %B March Full month name*
64 %c Wed Mar 08 14:54:40 1989 Date and time*
66 %d 08 Day of month (always two digits)
67 %D 03/08/89 Month/day/year (eight characters)
68 %e 8 Day of month (leading zero blanked)
69 %h Mar Abbreviated month name*
70 %H 14 24-hour-clock hour (two digits)
71 %I 02 12-hour-clock hour (two digits)
72 %j 067 Julian day number (three digits)
73 %k 2 12-hour-clock hour (leading zero blanked)
74 %l 14 24-hour-clock hour (leading zero blanked)
75 %m 03 Month number (two digits)
76 %M 54 Minute (two digits)
77 %n \\n newline character
78 %p PM AM/PM designation
79 %r 02:54:40 PM Hour:minute:second AM/PM designation
81 %S 40 Second (two digits)
83 %T 14:54:40 Hour:minute:second
84 %U 10 Sunday-based week number (two digits)
85 %w 3 Day number (one digit, Sunday is 0)
86 %W 10 Monday-based week number (two digits)
89 %y 89 Last two digits of year
91 %Z EST Time zone abbreviation
92 %+ Wed Mar 8 14:54:40 EST 1989 Default output format*
95 * The exact output depends on the locale.
98 If a character other than one of those shown above appears after
99 a percent sign in the format,
100 that following character is output.
101 All other characters in the format are copied unchanged to the output;
102 a newline character is always added at the end of the output.
104 In Sunday-based week numbering,
105 the first Sunday of the year begins week 1;
106 days preceding it are part of ``week 0.''
107 In Monday-based week numbering,
108 the first Monday of the year begins week 1.
110 To set the date, use a command line argument with one of the following forms:
114 .ta \w'198903081454\0'u
115 1454 24-hour-clock hours (first two digits) and minutes
116 081454 Month day (first two digits), hours, and minutes
117 03081454 Month (two digits, January is 01), month day, hours, minutes
118 8903081454 Year, month, month day, hours, minutes
119 0308145489 Month, month day, hours, minutes, year
120 (on System V-compatible systems)
121 030814541989 Month, month day, hours, minutes, four-digit year
122 198903081454 Four-digit year, month, month day, hours, minutes
126 If the century, year, month, or month day is not given,
127 the current value is used.
128 Any of the above forms may be followed by a period and two digits that give
129 the seconds part of the new time; if no seconds are given, zero is assumed.
131 These options are available:
134 Use UTC when setting and showing the date and time.
137 Do not notify other networked systems of the time change.
140 Set the kernel-stored Daylight Saving Time type to the given value.
141 (The kernel-stored DST type is used mostly by ``old'' binaries.)
143 .BI "\-t " minutes-west
144 Set the kernel-stored ``minutes west of UTC'' value to the one given on the
146 (The kernel-stored DST type is used mostly by ``old'' binaries.)
148 .BI "\-a " adjustment
149 Change the time forward (or backward) by the number of seconds
150 (and fractions thereof) specified in the
153 Either the seconds part or the fractions part of the argument (but not both)
155 On BSD-based systems,
156 the adjustment is made by changing the rate at which time advances;
157 on System-V-based systems, the adjustment is made by changing the time.
159 .ta \w'/usr/share/zoneinfo/posixrules\0\0'u
160 /usr/lib/locale/\f2L\fP/LC_TIME description of time locale \f2L\fP
162 /usr/share/zoneinfo time zone information directory
164 /usr/share/zoneinfo/localtime local time zone file
166 /usr/share/zoneinfo/posixrules used with POSIX-style TZ's
168 /usr/share/zoneinfo/GMT for UTC leap seconds
171 .B /usr/share/zoneinfo/GMT
173 UTC leap seconds are loaded from
174 .BR /usr/share/zoneinfo/posixrules .