Operating System - HP-UX
1752568 Members
5650 Online
108788 Solutions
New Discussion юеВ

Hardware clock / software clock discrepancy on L3000

 
Jacob W. Verkerke
New Member

Hardware clock / software clock discrepancy on L3000

During a recent install of an Oracle9i application, the vendor's expert found that there was a 5 hour difference between the 2 clocks, with the software clock showing the correct local time (HST). The application's job scheduler supposedly uses the hardware clock.

I have 2 quesitons:
1) How can I check the hardware clock's time?
2) If it is indeed off, how can I change it?

I have read some threads on the forums and there seems to be some confusion on whether the 2 clocks are supposed to synchronize each other upon boot, and if that actually always works.

Any help will be much appreciated.
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: Hardware clock / software clock discrepancy on L3000

This is nonsense. What is the probability of an exact 5 hour difference between a hardware clock and the software clock? Answer: Very nearly zero. What is going on is that TZ has not been taken into account. I suspect one value is gmtime() and the other is localtime().
If it ain't broke, I can fix that.
Jacob W. Verkerke
New Member

Re: Hardware clock / software clock discrepancy on L3000

A. Clay Stephenson, thank you for your courteous reply.

Perhaps I should have phrased the question a bit different. Dealing with timezone differences is a way of life here in Hawaii, so I had no difficulty in recognizing that the 5 hours difference between clocks represents precisely the lag to Eastern Standard Time from here.

Nevertheless, I still have a problem here that I do not know how to remedy. Does anyone have any suggestions?



Dave Johnson_1
Super Advisor

Re: Hardware clock / software clock discrepancy on L3000

In our case here in the Central Timezone, our "hardware" clock is set for GMT and the TZ var takes care of displaying the time adjusted as necessary for timezone. If your application does not do the TZ conversion, you will have to set TZ to GMT and then set the clock to local time. This means you will have to manually adjust for daylight savings time (does HI even use it, sorry I do not know this). Also with the TZ set funny, dates will not be printes with HST or HDT as you might like them to be.
Having spent my entire UNIX Admin carier in the centeral timezone, I do not have much experience to help with this.
It will be interesting to see if someone else has a better answer for you.

Good luck,
-Dave
Jacob W. Verkerke
New Member

Re: Hardware clock / software clock discrepancy on L3000

Thank you Dave,

The value of TZ is set to 'HST10" which seems appropriate. However, etc/default/tz contains the value 'EST5EDT' which may be the problem. I will check with the application vendor if somehow there program picks up the date and time in a way that is not how HP-UX normally handles these things.

Thanks for the help.
A. Clay Stephenson
Acclaimed Contributor

Re: Hardware clock / software clock discrepancy on L3000

Okay, that makes more sense.

You need to find out what the database time zone is set to:
select dbtimezone from dual;

I suspect this is what was called the 'hardware' clock.

You can change the timezone for a session like this:
ALTER SESSION SET TIME_ZONE = '-10:00';

You can also set the session TZ using environment variables as well. I suggest you search Oracle's Metalink where you should find ton's of data on timezones.
If it ain't broke, I can fix that.