Operating System - HP-UX
1826425 Members
3835 Online
109692 Solutions
New Discussion

Incorrect time in HP 11.11

 
Anh.Quan
Frequent Advisor

Incorrect time in HP 11.11

Dear Experts,

When i run command: #date, my system show incorrect time.
Ex:
Correct Time is: Fri Jun 16 09:15:00
The system show: Fri Jun 16 09:07:39 TST 2006

The content of my TIMEZONE file:
---------------
TZ=TST-7
export TZ
---------------
I don't know about TST, please help me "HOW TO CORRECT THIS PROBLEM"

Thanks very much !
Vu.

8 REPLIES 8
Anh.Quan
Frequent Advisor

Re: Incorrect time in HP 11.11

I live in Vietnam (GMT+07:00)
Michael Steele_2
Honored Contributor

Re: Incorrect time in HP 11.11


When you run 'set_parms timezone' it will display all of the world's timezones.

set_parms date_time

set_parms timezone

http://docs.hp.com/en/B2355-60103/set_parms.1M.html
Support Fatherhood - Stop Family Law
A. Clay Stephenson
Acclaimed Contributor

Re: Incorrect time in HP 11.11

You are only off a few minutes so your TZ (which would make you off by hour intervals in almost all cases) is ok. You need to set the time forward and that is a safe direction. It's more dangerous to set the time backward. Simply run the date command and set the date. Man date for details. That will fix you for a little while because almost all computer clocks drift. The real answer is to get NTP working; you can reference 3 or more Internet timeservers and easily maintain accuracy to a few milliseconds. Do a search on NTP and you should get all the help you need.
If it ain't broke, I can fix that.
Anh.Quan
Frequent Advisor

Re: Incorrect time in HP 11.11

Dear Mr A. Clay Stephenson,

I already set time by date command, but someday later It repeat old error. I thinks, it 's not good solution.

Regards,
Vu
Anh.Quan
Frequent Advisor

Re: Incorrect time in HP 11.11

Dear Mr A. Clay Stephenson,

I already set time by date command, but someday later It repeat old error. I thinks, This 's not good solution.

Regards,
Vu
Mustafa Gulercan
Respected Contributor

Re: Incorrect time in HP 11.11

hi Q.Vu;

1-check TIMEZONE ;
#/sbin/set_parms timezone
press 6 for asia
than press 9 for unlisted time-zone.
Enter the time zone for your location

2-if there is a timeserver on your network.configure the NTP.

a- add timeserver IP to the /etc/hosts
x.x.x.x timesrv@example.com

b- edit /etc/rc.config.d/netdaemons like following;
NTPDATE_SERVER=â timesrv@example.comâ
XNTPD=1

c-edit /etc/ntp.conf like following;

server timesrv@example.com
driftfile /etc/ntp.drift

d- /sbin/init.d/xntpd stop
/sbin/init.d/xntpd start

e- check the time ;
ntpdate â q timesrv@example.com
or;
set the time once;
ntpdate â b timesrv@example.com


regards;
mustafa
MarkSyder
Honored Contributor

Re: Incorrect time in HP 11.11

I have seen this before: in my case the server was running ntp but was tied to a server with the wrong time.

ps -ef|grep ntp

If you see /usr/sbin/xntpd you are running ntp.

The final line of /etc/ntp.conf will give you the name of the server you are tied to.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
A. Clay Stephenson
Acclaimed Contributor

Re: Incorrect time in HP 11.11

That is exactly what I said. The date command is only a temporary fix because almost all computer clocks drift (run slightly fast or slow) so the real solution is to reference network time servers. NTP will automatically adjust the system time by making each second slightly longer or shorter to keep your system time accurate to within a few milliseconds all the time.
If it ain't broke, I can fix that.