3 date - show and set date and time
6 date [ -u ] [ -c ] [ -n ] [ -d dsttype ] [ -t minutes-west ]
7 [ -a [+|-]sss.fff ] [ +format ] [ [yyyy]mmddhhmm[yy][.ss] ]
10 Date without arguments writes the date and time to the
11 standard output in the form
12 Wed Mar 8 14:54:40 EST 1989
13 with EST replaced by the local time zone's abbreviation (or
14 by the abbreviation for the time zone specified in the TZ
15 environment variable if set). The exact output format
16 depends on the locale.
18 If a command-line argument starts with a plus sign (`+'),
19 the rest of the argument is used as a format that controls
20 what appears in the output. In the format, when a percent
21 sign (`%') appears, it and the character after it are not
22 output, but rather identify part of the date or time to be
23 output in a particular way (or identify a special character
26 Sample output Explanation
27 %a Wed Abbreviated weekday name*
28 %A Wednesday Full weekday name*
29 %b Mar Abbreviated month name*
30 %B March Full month name*
31 %c Wed Mar 08 14:54:40 1989 Date and time*
33 %d 08 Day of month (always two digits)
34 %D 03/08/89 Month/day/year (eight characters)
35 %e 8 Day of month (leading zero blanked)
36 %h Mar Abbreviated month name*
37 %H 14 24-hour-clock hour (two digits)
38 %I 02 12-hour-clock hour (two digits)
39 %j 067 Julian day number (three digits)
40 %k 2 12-hour-clock hour (leading zero blanked)
41 %l 14 24-hour-clock hour (leading zero blanked)
42 %m 03 Month number (two digits)
43 %M 54 Minute (two digits)
44 %n \n newline character
45 %p PM AM/PM designation
46 %r 02:54:40 PM Hour:minute:second AM/PM designation
48 %S 40 Second (two digits)
50 %T 14:54:40 Hour:minute:second
51 %U 10 Sunday-based week number (two digits)
52 %w 3 Day number (one digit, Sunday is 0)
53 %W 10 Monday-based week number (two digits)
56 %y 89 Last two digits of year
58 %Z EST Time zone abbreviation
59 %+ Wed Mar 8 14:54:40 EST 1989 Default output format*
60 * The exact output depends on the locale.
62 If a character other than one of those shown above appears
63 after a percent sign in the format, that following character
64 is output. All other characters in the format are copied
65 unchanged to the output; a newline character is always added
66 at the end of the output.
68 In Sunday-based week numbering, the first Sunday of the year
69 begins week 1; days preceding it are part of ``week 0.'' In
70 Monday-based week numbering, the first Monday of the year
73 To set the date, use a command line argument with one of the
75 1454 24-hour-clock hours (first two digits) and minutes
76 081454 Month day (first two digits), hours, and minutes
77 03081454 Month (two digits, January is 01), month day, hours, minutes
78 8903081454 Year, month, month day, hours, minutes
79 0308145489 Month, month day, hours, minutes, year
80 (on System V-compatible systems)
81 030814541989 Month, month day, hours, minutes, four-digit year
82 198903081454 Four-digit year, month, month day, hours, minutes
83 If the century, year, month, or month day is not given, the
84 current value is used. Any of the above forms may be
85 followed by a period and two digits that give the seconds
86 part of the new time; if no seconds are given, zero is
89 These options are available:
92 Use UTC when setting and showing the date and time.
94 -n Do not notify other networked systems of the time
98 Set the kernel-stored Daylight Saving Time type to the
99 given value. (The kernel-stored DST type is used
100 mostly by ``old'' binaries.)
103 Set the kernel-stored ``minutes west of UTC'' value to
104 the one given on the command line. (The kernel-stored
105 DST type is used mostly by ``old'' binaries.)
108 Change the time forward (or backward) by the number of
109 seconds (and fractions thereof) specified in the
110 adjustment argument. Either the seconds part or the
111 fractions part of the argument (but not both) may be
112 omitted. On BSD-based systems, the adjustment is made
113 by changing the rate at which time advances; on
114 System-V-based systems, the adjustment is made by
118 /usr/lib/locale/L/LC_TIME description of time
120 /usr/local/etc/zoneinfo time zone information
122 /usr/local/etc/zoneinfo/localtime local time zone file
123 /usr/local/etc/zoneinfo/posixrules used with POSIX-style
125 /usr/local/etc/zoneinfo/GMT for UTC leap seconds
127 If /usr/local/etc/zoneinfo/GMT is absent, UTC leap seconds
128 are loaded from /usr/local/etc/zoneinfo/posixrules.