Operating System - HP-UX
1854845 Members
30690 Online
104103 Solutions
New Discussion

Re: time still wrong after tztab patch PHCO_37720

 
SOLVED
Go to solution
eallen
Advisor

time still wrong after tztab patch PHCO_37720

I am having an issue with the time change. I am running HP-UX 11.11 with patch PHCO_37720. My TZ variable is set to CST6CDT. When I update from an NTP server (ntp-2.mcs.anl.gov) it sets my time 1 hour back. I don't know where to go from here.

Any help is appreicated!
22 REPLIES 22
Steven E. Protter
Exalted Contributor

Re: time still wrong after tztab patch PHCO_37720

Shalom,

setparms timezone

Follow the instructions provided there and reboot the system.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: time still wrong after tztab patch PHCO_37720

The NTP server should be adjusting the GMT time on your server.

What do the following show?

# date -u

# date

'date -u' should show the GMT/UDT time. The 'date' should show your current time.

You have to remember that the time on your server should NEVER change, because it is always kept in GMT/UDT. However, what does change is how the time is displayed which is based on your TZ setting.

It may well be that NTP is doing precisely what it is designed to do.
James R. Ferguson
Acclaimed Contributor

Re: time still wrong after tztab patch PHCO_37720

Hi:

NTP works in UTC (GMT). Your TZ setting determines what you perceive to be local time.

Moreover, the 'xntp' daemon will NOT synchronize your server's time if it differs from its source time by more than 1000 seconds. This prevents insane corrections.

Verify your server's time as:

# TZ=UTC date

If this is not correct, use 'date -u' to set it correctly.

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: time still wrong after tztab patch PHCO_37720

Apparently I haven't had enough coffee yet this morning.

Where I said UDT above, I meant UTC.
eallen
Advisor

Re: time still wrong after tztab patch PHCO_37720

The output from "date -u" and "date" are as follows...

# date -u;date
Wed Mar 19 15:08:24 UTC 2008
Wed Mar 19 09:08:24 CST 2008

What happened was that the time was wrong and we updated it manually using the "date" command to set it to the proper local time. We are in Chicago and follow DST.

I would like not to reboot, if possible. I am running a 24/7 shop.

eallen
Advisor

Re: time still wrong after tztab patch PHCO_37720

I noticed that the UTC time on my server is 1 hour off. Probably my fault for setting the time manually but I can't figure out how to get it to be correct otherwise. I will investigate some more suggestions in the replies.
eallen
Advisor

Re: time still wrong after tztab patch PHCO_37720

# echo $TZ
CST6CDT


from tztab...

# Central Standard Time, Central Daylight Time
CST6CDT
0 3 24-30 4 1970-1973 0 CDT5
0 3 6 1 1974 0-6 CDT5
0 3 22-28 2 1975 0 CDT5
0 3 24-30 4 1976-1986 0 CDT5
0 3 1-7 4 1987-2038 0 CDT5
0 1 25-31 10 1970-1973 0 CST6
0 1 24-30 11 1974 0 CST6
0 1 25-31 10 1975-2006 0 CST6
0 1 1-7 11 2007-2038 0 CST6


Am I missing something here? This looks correct to me.

Patrick Wallek
Honored Contributor
Solution

Re: time still wrong after tztab patch PHCO_37720

Your tztab file is missing the update for the new start time of daylight saving time.

Here is the CST/CDT excerpt from my tztab file:

# Central Standard Time, Central Daylight Time
CST6CDT
0 3 24-30 4 1970-1973 0 CDT5
0 3 6 1 1974 0-6 CDT5
0 3 22-28 2 1975 0 CDT5
0 3 24-30 4 1976-1986 0 CDT5
0 3 1-7 4 1987-2006 0 CDT5
0 3 8-14 3 2007-2038 0 CDT5 <--- You are missing this line.
0 1 25-31 10 1970-1973 0 CST6
0 1 24-30 11 1974 0 CST6
0 1 25-31 10 1975-2006 0 CST6
0 1 1-7 11 2007-2038 0 CST6
Patrick Wallek
Honored Contributor

Re: time still wrong after tztab patch PHCO_37720

I should add, with your current tztab file, your time will change the first weekend in April, which is the old time.

How did this work last year?
eallen
Advisor

Re: time still wrong after tztab patch PHCO_37720

Patrick,

Thanks for the info. Short answer is that it didn't work last year. We again updated the time manually.

I did apply the patch and it said it was successful. For some reason it doesn't seem to have replaced the tztab file. Are there other steps to take?
James R. Ferguson
Acclaimed Contributor

Re: time still wrong after tztab patch PHCO_37720

Hi (again):

> I would like not to reboot, if possible. I am running a 24/7 shop.

Once you have the correct 'tztab' file in place and the correct UTC time, you should plan a reboot. This is the simplest way to restart all databases, the 'cron' daemon, and any other processes that need to recache the new rules. You should do this BEFORE the pre-2007 rules would take affect!

Regards!

...JRF...
eallen
Advisor

Re: time still wrong after tztab patch PHCO_37720

Patrick, Thanks. I'll try and plan a reboot. I just updated my tztab to reflect the one you posted and then did a update from NTP and I am now showing the correct time.

# date-u;date
Wed Mar 19 15:18:03 UTC 2008
Wed Mar 19 10:18:03 CDT 2008


Thanks for your help everyone!!
Dennis Handly
Acclaimed Contributor

Re: time still wrong after tztab patch PHCO_37720

>Short answer is that it didn't work last year. We again updated the time manually.
>I did apply the patch and it said it was successful. For some reason it doesn't seem to have replaced the tztab file. Are there other steps to take?

If you have manually updated your tztab file, the tztab(4) patches will refuse to install the new tztab file. And this will continue...
Can you look at your swinstall log to see what it said? A NOTE or WARNING.

You'll need to either remove all of your changes and put the original tztab file back and then apply the patch. Does swlist show that PHCO_37720 is installed?

If so, you might be able to use this to fix it:
# swverify -F PHCO_37720
Then ask swinstall to reinstall the patch:
# swinstall -x reinstall=true -s $PWD/PHCO_37720.depot PHCO_37720
Dennis Handly
Acclaimed Contributor

Re: time still wrong after tztab patch PHCO_37720

>JRF: You should do this BEFORE the pre-2007 rules would take affect!

Why would this make a difference? It is broken now, it won't get worse in April, just better. I would have thought the correct statement is to do it before the pre-2007 rules take effect in Oct. :-)
Or before the 2007 rules take effect in March but it's too late for 2008.
eallen
Advisor

Re: time still wrong after tztab patch PHCO_37720

I did edit the tztab file before the patch so what you are saying makes sense. However, my swinstall log does not show any errors or warnings.

======= 03/18/08 14:18:05 CST BEGIN swinstall SESSION (interactive)

NOTE: The interactive UI was invoked, since no software was
specified.

* Session started for user "root@insert".

* The default source "/var/spool/sw" does not exist or is not a
valid source and there are no other registered depots on
insert. You can type in the depot path on this host or choose
a different host.
* The default source "/var/spool/sw" does not exist or is not a
valid source and there are no other registered depots on
insert. You can type in the depot path on this host or choose
a different host.
* Beginning Selection
* Please use caution when changing options. They allow useful
flexibility but can produce harmful results if changed to a
value inappropriate for your needs.

Each option is fully explained in the online help. Please
consult online help or written documentation before changing
an option.
admin_directory /var/adm/sw
agent_auto_exit false
agent_timeout_minutes 10000
allow_downdate false
allow_incompatible false
allow_multiple_versions false
allow_split_patches false
ask false
autoreboot false
autorecover false
autorecover_product false
autoremove_job true
autoselect_dependencies true
autoselect_patches true
autoselect_reference_bundles true
compress_files false
compress_index false
create_target_path true
create_time_filter 0
customer_umask_octal 0022
defer_configure false
enforce_dependencies true
enforce_dsa true
enforce_kernbld_failure true
enforce_locatable true
enforce_scripts true
fix_explicit_directories false
installed_software_catalog products
layout_version 1.0
log_msgid 0
logdetail false
logfile /var/adm/sw/swinstall.log
loglevel 1
match_target false
max_targets 25
mount_all_filesystems true
patch_filter *.*
patch_match_target false
patch_save_files true
polling_interval 2
preview false
register_new_root true
reinstall false
reinstall_files false
reinstall_files_use_cksum true
retry_rpc 1
retry_rpc_interval 0
reuse_short_job_numbers true
rpc_binding_info ncacn_ip_tcp:[2121] ncadg_ip_udp:[2121]
rpc_timeout 5
run_as_superuser true
select_local true
software_view all_bundles
source_cdrom /SD_CDROM
source_type directory
distribution_source_directory insert:/tmp/PHCO_37720.d
epot
use_alternate_source false
verbose 1
write_remote_files false
* Source: insert:/tmp/PHCO_37720.depot
* Targets: insert:/
* Software selections:
PHCO_37720.UX-CORE,r=1.0,a=HP-UX_B.11.11_32/64,v=HP,fr=1.0,fa=HP-UX
_B.11.11_32/64
* Beginning Analysis
* The analysis phase succeeded for "insert:/".
* Ending Analysis
* Beginning Task Execution
* Proceeding with Task Execution on the following targets:
* insert:/
* The execution phase succeeded for "insert:/".
* Ending Task Execution

======= 03/18/08 14:20:51 CST END swinstall SESSION (interactive)
eallen
Advisor

Re: time still wrong after tztab patch PHCO_37720

swlist and swverify both show the patch PHCO_37720 is installed. I did look at the header of the tztab file and I don't see the patch information there as usual.

first line of tztab...
--------------
# @(#)B.11.11_LR
Dennis Handly
Acclaimed Contributor

Re: time still wrong after tztab patch PHCO_37720

>my swinstall log does not show any errors or warnings.

I'll have to try it myself to see where that message goes.
Dennis Handly
Acclaimed Contributor

Re: time still wrong after tztab patch PHCO_37720

>swlist and swverify both show the patch PHCO_37720 is installed. I did look at the header of the tztab file and I don't see the patch information there as usual.

Somehow your swinstall.log output is broken. You have too much detail but not enough! Perhaps because you used the GUI?
Mine has at the end:
...
NOTE: More information may be found in the agent logfile using the
command "swjob -a log ...".

And inside there it has:
NOTE: A new version of "/usr/lib/tztab" has been placed on the
system. The new version is located at
"/usr/newconfig/usr/lib/tztab".
The existing version of "/usr/lib/tztab" is not being
overwritten since it appears that it has been modified by the
administrator since it was delivered.

This is also in /var/adm/sw/swagent.log.

So to fix your system you need to do:
# fool system to think you didn't fiddle with it
# cp /usr/old/usr/newconfig/usr/lib/tztab /usr/lib/tztab
# Reinstall the patch
# swinstall -x reinstall=true -s $PWD/PHCO_37720.depot \*

James R. Ferguson
Acclaimed Contributor

Re: time still wrong after tztab patch PHCO_37720

Hi (again):

> Dennis: >JRF: You should do this BEFORE the pre-2007 rules would take affect!

> Dennis: Why would this make a difference? It is broken now, it won't get worse in April, just better.

Yes, that of course is correct. My point (though stated poorly) was that the "improvement" in April would further "hide" the fundamental problem that should have been addressed pre-Spring 2007 :-)

Regards!

...JRF...
eallen
Advisor

Re: time still wrong after tztab patch PHCO_37720

Found it! The elusive error was in /var/adm/sw/swagent.log as Dennis said. I just replaced the current version of tztab with the version from /usr/newconfig/usr/lib/tztab since the system thinks it's already installed anyway. Everything looks good now. Thanks everyone!!

* Installing fileset "PHCO_37720.UX-CORE,r=1.0" (1 of 1).
NOTE: A new version of "/usr/lib/tztab"
has been placed on the system.
The new version is located at "/usr/newconfig/usr/lib/tztab".
The existing version of "/usr/lib/tztab" is not being
overwritten since it appears that it has been modified by
the administrator since it was delivered.
* Running install clean command /usr/lbin/sw/install_clean.
NOTE: tlinstall is searching filesystem - please be patient
NOTE: Successfully completed


Dennis Handly
Acclaimed Contributor

Re: time still wrong after tztab patch PHCO_37720

>I just replaced the current version of tztab with the version from /usr/newconfig/usr/lib/tztab since the system thinks it's already installed anyway.

If you don't reinstall the patch as I showed, this problem will happen again!

Alternately, if you use "swverify -F PHCO_37720" is should work.
eallen
Advisor

Re: time still wrong after tztab patch PHCO_37720

I just ran the command, thanks Dennis!