Date & Time (215 Views)
Reply
Occasional Contributor
Vijay Bhatkar
Posts: 4
Registered: ‎05-28-2008
Message 1 of 4 (215 Views)
Accepted Solution

Date & Time

How can I change Date & Time in HP UX 11.11
Frequent Advisor
Santosh P Karpe
Posts: 38
Registered: ‎03-30-2008
Message 2 of 4 (215 Views)

Re: Date & Time

Dear Vijay

U can change u r system date & time by date command i.e.

Set the date to Oct 8, 12:45 a.m.

#date 10080045
But remember u should superuser.

santosh Karpe
Occasional Contributor
Vijay Bhatkar
Posts: 4
Registered: ‎05-28-2008
Message 3 of 4 (215 Views)

Re: Date & Time

Thanks Santosh,

Will the year field get set automatically?
Honored Contributor
Liem Nguyen
Posts: 306
Registered: ‎02-11-2003
Message 4 of 4 (215 Views)

Re: Date & Time

You can view the manpage:

# man date


date [-u] [mmddhhmm[[cc]yy]]

Set the HP-UX system clock to the date and time specified. You require the superuser privilege.

If you include the -u option, the specified date and time
is assumed to be in Coordinated Universal Time (UTC).

The numeric argument is interpreted left to right in
two-digit pairs as follows:

mm Month number [01-12].
dd Day number in the month [01-31].
hh Hour number (24-hour system) [00-23].
mm Minute number [00-59].
cc Century minus one [19-20].
yy Last two digits of the year number [70-99, 00-
37 (1970-1999, 2000-2037)]. If omitted, the
current year is used.

If you attempt to set the date backwards, date generates
the warning,
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.