3 date \- show and set date and time
7 .ie \n(.g .ds - \f(CW-\fP
20 \fR[\fIyyyy\fR]\fImmddhhmm\fR[\fIyy\fR][\fB.\fIss\fR]
23 .ie '\(lq'' .ds lq \&"\"
25 .ie '\(rq'' .ds rq \&"\"
28 \\$3\*(lq\\$1\*(rq\\$2
31 without arguments writes the date and time to the standard output in
34 Wed Mar 8 14:54:40 EST 1989
38 replaced by the local time zone's abbreviation
39 (or by the abbreviation for the time zone specified in the
41 environment variable if set).
42 The exact output format depends on the locale.
44 If a command-line argument starts with a plus sign (\c
46 the rest of the argument is used as a
48 that controls what appears in the output.
49 In the format, when a percent sign (\c
52 it and the character after it are not output,
53 but rather identify part of the date or time
54 to be output in a particular way
55 (or identify a special character to output):
60 .ta \w'%M\0\0'u +\w'Wed Mar 8 14:54:40 EST 1989\0\0'u
61 Sample output Explanation
62 %a Wed Abbreviated weekday name*
63 %A Wednesday Full weekday name*
64 %b Mar Abbreviated month name*
65 %B March Full month name*
66 %c Wed Mar 08 14:54:40 1989 Date and time*
68 %d 08 Day of month (always two digits)
69 %D 03/08/89 Month/day/year (eight characters)
70 %e 8 Day of month (leading zero blanked)
71 %h Mar Abbreviated month name*
72 %H 14 24-hour-clock hour (two digits)
73 %I 02 12-hour-clock hour (two digits)
74 %j 067 Julian day number (three digits)
75 %k 2 12-hour-clock hour (leading zero blanked)
76 %l 14 24-hour-clock hour (leading zero blanked)
77 %m 03 Month number (two digits)
78 %M 54 Minute (two digits)
79 %n \\n newline character
80 %p PM AM/PM designation
81 %r 02:54:40 PM Hour:minute:second AM/PM designation
83 %S 40 Second (two digits)
85 %T 14:54:40 Hour:minute:second
86 %U 10 Sunday-based week number (two digits)
87 %w 3 Day number (one digit, Sunday is 0)
88 %W 10 Monday-based week number (two digits)
91 %y 89 Last two digits of year
93 %z -0500 Numeric time zone
94 %Z EST Time zone abbreviation
95 %+ Wed Mar 8 14:54:40 EST 1989 Default output format*
98 * The exact output depends on the locale.
101 If a character other than one of those shown above appears after
102 a percent sign in the format,
103 that following character is output.
104 All other characters in the format are copied unchanged to the output;
105 a newline character is always added at the end of the output.
107 In Sunday-based week numbering,
108 the first Sunday of the year begins week 1;
109 days preceding it are part of
111 In Monday-based week numbering,
112 the first Monday of the year begins week 1.
114 To set the date, use a command line argument with one of the following forms:
118 .ta \w'198903081454\0'u
119 1454 24-hour-clock hours (first two digits) and minutes
120 081454 Month day (first two digits), hours, and minutes
121 03081454 Month (two digits, January is 01), month day, hours, minutes
122 8903081454 Year, month, month day, hours, minutes
123 0308145489 Month, month day, hours, minutes, year
124 (on System V-compatible systems)
125 030814541989 Month, month day, hours, minutes, four-digit year
126 198903081454 Four-digit year, month, month day, hours, minutes
130 If the century, year, month, or month day is not given,
131 the current value is used.
132 Any of the above forms may be followed by a period and two digits that give
133 the seconds part of the new time; if no seconds are given, zero is assumed.
135 These options are available:
138 Use Universal Time when setting and showing the date and time.
141 Output the date that corresponds to
143 past the epoch of 1970-01-01 00:00:00 UTC, where
145 should be an integer, either decimal, octal (leading 0), or
146 hexadecimal (leading 0x), preceded by an optional sign.
148 .ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u
149 /usr/lib/locale/\f2L\fP/LC_TIME description of time locale \f2L\fP
151 /usr/local/etc/zoneinfo time zone information directory
153 /usr/local/etc/zoneinfo/localtime local time zone file
155 /usr/local/etc/zoneinfo/posixrules used with POSIX-style TZ's
157 /usr/local/etc/zoneinfo/GMT for UTC leap seconds
160 .B /usr/local/etc/zoneinfo/GMT
162 UTC leap seconds are loaded from
163 .BR /usr/local/etc/zoneinfo/posixrules .
164 .\" This file is in the public domain, so clarified as of
165 .\" 2009-05-17 by Arthur David Olson.