How to change system time in HP UX?
we can change the system time using below commands.
1.date command
2.set_parms command
A.To set the date and time on HP-UX
date [-u] [mmddhhmm[[cc]yy]]
date -u 032912202008
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.
#date -u 0329120503
EX : mar -29 , 05:03 AM in EST
we can change the system time using below commands.
1.date command
2.set_parms command
A.To set the date and time on HP-UX
date [-u] [mmddhhmm[[cc]yy]]
date -u 032912202008
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.
#date -u 0329120503
EX : mar -29 , 05:03 AM in EST
Note : Date command will change the system time is EST time zone default.
B. Using SET_PARMS command
1.. set_parms : command
Usage: set_parms
Where can be:
hostname
timezone
date_time
root_passwd
ip_address
addl_netwrk
locale
or initial (for entire initial boot-time dialog sequence)
2. How to change using set_parm ?
root# set_parms date_time
_______________________________________________________________________________
This section enables you to set the system clock.
_______________________________________________________________________________
The current system time is Sat Mar 31 12:59:38 BST 2012
Is this correct?
Press [y] for yes or [n] for no, then press [Enter] n
_______________________________________________________________________________
You will be prompted for the date and time. Please enter all values
numerically, for example January is 1. The values in the parentheses
give the acceptable range of responses.
_______________________________________________________________________________
Please enter the last two digits of the year (00-99), then press [Enter] 12
Please enter the month (1-12), then press [Enter] 03
Please enter the date of the month (1-31), then press [Enter] 30
Please enter the hour (using 24 hour time) (0-23)
For example: For 10 in the morning enter 10, for 3 in the afternoon enter 15.
Then press [Enter] 12
Please enter the minute (0-59), then press [Enter] 00
You have entered: Mar 30 12:00:00 GMT0BST 2012.
This time will be used to reset the system clock.
Is this value correct?
Press [y] for yes or [n] for no, then press [Enter] y
The date and time have been set to: Fri Mar 30 12:00:00 BST 2012
Press [Enter] to continue...
root#
3. Verify the time
root# date
Fri Mar 30 12:00:06 BST 2012
root#
B. Using SET_PARMS command
1.. set_parms : command
Usage: set_parms
Where
hostname
timezone
date_time
root_passwd
ip_address
addl_netwrk
locale
or initial (for entire initial boot-time dialog sequence)
2. How to change using set_parm ?
root# set_parms date_time
_______________________________________________________________________________
This section enables you to set the system clock.
_______________________________________________________________________________
The current system time is Sat Mar 31 12:59:38 BST 2012
Is this correct?
Press [y] for yes or [n] for no, then press [Enter] n
_______________________________________________________________________________
You will be prompted for the date and time. Please enter all values
numerically, for example January is 1. The values in the parentheses
give the acceptable range of responses.
_______________________________________________________________________________
Please enter the last two digits of the year (00-99), then press [Enter] 12
Please enter the month (1-12), then press [Enter] 03
Please enter the date of the month (1-31), then press [Enter] 30
Please enter the hour (using 24 hour time) (0-23)
For example: For 10 in the morning enter 10, for 3 in the afternoon enter 15.
Then press [Enter] 12
Please enter the minute (0-59), then press [Enter] 00
You have entered: Mar 30 12:00:00 GMT0BST 2012.
This time will be used to reset the system clock.
Is this value correct?
Press [y] for yes or [n] for no, then press [Enter] y
The date and time have been set to: Fri Mar 30 12:00:00 BST 2012
Press [Enter] to continue...
root#
3. Verify the time
root# date
Fri Mar 30 12:00:06 BST 2012
root#
0 Comments