Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
d
date(1) date(1)
do you really want to run time backwards?[yes/no]
Type yes or the equivalent for your locale to set the clock backwards; anything else to cancel
the command.
When date is used to set the date, a pair of date change records is written to the file
/var/adm/wtmp .
(XPG4 only.) No warning is generated if date is set backwards.
Formatting Directives
The following formatting directives, shown without the optional field width and precision specification, are
replaced by the indicated characters. If a directive is not one of the following, the result is undefined.
The output for digits, characters, and words depends on the language/locale settings. See Environment
Variables in EXTERNAL INFLUENCES below.
The examples assume that the date command was executed on Wednesday, January 12, 1994 at 7:45:58
p.m. Pacific Standard Time, using the C default language.
%a Abbreviated weekday name. For example,
Wed.
%A Full weekday name. For example,
Wednesday.
%b Abbreviated month name. For example, Jan.
%B Full month name. For example, January.
%c Current date and time representation. For example,
Wed Jan 12 19:45:58 1994.
%C Century (the year divided by 100 and truncated to an integer) as a two-digit decimal number
[00-99]. For example, 19.
%d Day of the month as a two-digit decimal number [01-31]. For example,
12.
%e Day of the month as a two-character decimal number with leading space fill [
"1"-"31" ].
For example,
12.
%E Combined Emperor/Era name and year.
%H Hour (24-hour clock) as a two-digit decimal number [00-23]. For example,
19.
%I Hour (12-hour clock) as a two-digit decimal number [01-12]. For example,
07.
%j Day of the year as a three-digit decimal number [001-366]. For example,
012.
%m Month as a decimal two-digit number [01-12]. For example, 01
.
%M Minute as a decimal two-digit number [00-59]. For example, 45.
%n Newline character.
%N Emperor/Era name.
%o Emperor/Era year.
%p Equivalent of either AM or PM. For example, PM.
%R Time as %H:%M
%S Second as a two-digit decimal number (allows for possible leap seconds) [00-61]. For example,
58.
%t Tab character.
%u Weekday as a one-digit decimal number [1-7 (Monday-Sunday)]. For example,
3.
%U Week number of the year (Sunday as the first day of the week) as a two-digit decimal number
[
00-53]. All days that precede the first Sunday in the year are considered to be in week 00.
For example, 02.
%V Week number of the year (Monday as the first day of the week) as a two-digit decimal number
[01-53]. If the week containing January 1 has four or more days in the new year (January 1 is
Thursday or sooner), it is designated as week 01; otherwise, (January 1 is Friday or later), it is
designated as the last week of the previous year, and the next week is week 01. For example,
02.
HP-UX Release 11i: December 2000 − 2 − Section 1−−165
___
___