1834494 Members
2936 Online
110067 Solutions
New Discussion

Re: time

 
Jeff Hagstrom
Regular Advisor

time

RP7410 HPUX 11.i.
How do you set the time?
7 REPLIES 7
SANTOSH S. MHASKAR
Trusted Contributor

Re: time

U can set time using command date, see
only root can do this job.
# man date

the onether option is to use command
# set_parms date_time

be cautious while setting time of the system.
espacially while redicing the value.
Also stop cron daemon before setting time and
start it after u finish.


-Santosh
Anshumali
Esteemed Contributor

Re: time

set_parms date_time
Press n
Enter last two digits of the year (00-99)
enter the month (1-12)
date of the month (1-31)
enter the hour (using 24 hour time) (0-23)
enter the minute (0-59)
Verify the time
Press Y

or

Do a man date and modify accordingly.

or

Open SAM
Open time
Go to System Clock
Enter time/date/month/year
Press OK

---Have a look at your cron before you increase or decrease the time. Cron behaves differently in each situation.If you increase the time past the missed schedule, cron will attempt to catch up the schedule. If you decrease time, cron wont fire the entry till the mentioned time comes.
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Hein van den Heuvel
Honored Contributor

Re: time

Jeff,

I'm curious... why do you have to set the time?

Did your system per chance decide to do a Daylight Savings 1 hour adjust?

In that case, perhaps you need to make sure the right new DST rules are in place, rather then tweaking tweaking the hands on the dial. Google: +hpux +dst

fwiw,
Hein.


Khashru
Valued Contributor

Re: time

You can change time by date command or set_parms option. But why you need to change time?
Reshma Malusare
Trusted Contributor

Re: time

Hi Jeff,
You can change time with date command and also by set_parms option. While doing this check that you have administrative rights i.e you are super user.

Ashish Parashar
Frequent Advisor

Re: time

Hi Jeff

Use date command with following syntex:-

date [-u] mmddhhmm[yy]

HP-UX sets system clock to the date and time specified, Requires super-user privilege.If -u option is given, the specified date and time is assumed to be Universal Time. The numeric argument is interpreted mm Month number. dd Day number in the month.
hh Hour number (24 hour system). mm Minute number.

yy (optional) Last 2 digits of the
year number.



Regards

Ashish
Raj D.
Honored Contributor

Re: time

Jeff,

set_parms and date can be use to change the date,



Use # set_parms date_time
And you can change it.

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "