System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Datelight saving time not working!

 
jasonK_1
Frequent Advisor

Datelight saving time not working!

My timezone is PST8PDT, right now the box shows it is Fri Mar 13 11:10:02 PDT 2015.  It should shows Fri Mar 13 11:52:02 PDT 2015.  It is 40 minutes off. I have the patch and correct timezone.  Below is my setting:

 

/# uname -a
HP-UX coloc3 B.11.31 U 9000/800 2221170520 unlimited-user license

 

# echo $TZ
PST8PDT

 

# cat /etc/TIMEZONE
TZ=PST8PDT
export TZ

 

# swlist -l patch |grep PHCO_39174
PHCO_39174.UX-CORE 1.0 OS-Core.UX-CORE applied
# PHCO_39174 1.0 tztab(4) cumulative patch
# PHCO_39174.UX-CORE 1.0 OS-Core.UX-CORE applied

 

 

7 REPLIES
Dennis Handly
Acclaimed Contributor

Re: System clock not set properly

>It should show Fri Mar 13 11:52:02 PDT 2015.  It is 40 minutes off.

 

This means you need to reset your system clock, nothing wrong with DST, since you see "PDT".

Is clock battery ok?  Do you use NTP to sync the clock?

What does this show:

TZ=PST8PDT date; date -u
 

Patrick Wallek
Honored Contributor

Re: System clock not set properly

Was your time correct before the change to daylight saving time?

 

I kind of doubt it.  I agree with Dennis in that this is an issue of the time just being incorrect, not DST behaving incorrectly.

jasonK_1
Frequent Advisor

Re: System clock not set properly

# TZ=PST8PDT date; date -u
Mon Mar 16 14:44:19 PDT 2015
Mon Mar 16 21:44:19 UTC 2015

 

 

I thought I have the ntpd running but somehow it quits... I just restart it, hopefully it will sync to the correct time whithin 24 hours.

 

Thanks

Dennis Handly
Acclaimed Contributor

Re: System clock not set properly

Mon Mar 16 14:44:19 PDT 2015
Mon Mar 16 21:44:19 UTC 2015

 

This just shows it is now 7 hours apart, the correct value for PDT.

Patrick Wallek
Honored Contributor

Re: System clock not set properly

If your time is truly 40 minutes off, as you mentioned in your original question, then NTP will not work.  That much of a time difference is outside of what NTP can handle.

 

The only way you are going to be able to get the time back in sync is to run the 'ntpdate' command and let it jump the time to the correct time and then let NTP keep the time in sync.

 

However I would recommend shutting down any applications that may be running as that much of a time jump can impact applications.

jasonK_1
Frequent Advisor

Re: System clock not set properly

You are right, NTP won't sync with a big gap in time.  I will need to shutdow my Oracle then adjust the time then bring it back up... Do i need a reboot?

Patrick Wallek
Honored Contributor

Re: System clock not set properly

No, you should not need to reboot.

 

If you  have a valid NTPDATE_SERVER set in the /etc/rc.config.d/netdaemons file, then you can just stop and restart NTP.

 

When NTP is restarted it will first call the 'ntpdate' command to jump the time to the correct time.  Then it will start the 'xntpd' daemon to keep the time in sync. 

 

If you do not have a valid NTPDATE_SERVER set, then you will need to manually reset the date on the server so that is within a minute or 2 of the correct time, and then start NTP so that it can sync the time and keep it in sync. 

 

I also prefer to add the '-x' option to the XNTPD_ARGS line in the /etc/rc.config.d/netdaemons file.  '-x' tells xntpd to make all time adjustments via slew.