1825965 Members
3106 Online
109690 Solutions
New Discussion

Re: Tztab "stuck"

 
SOLVED
Go to solution
Greg White
Frequent Advisor

Tztab "stuck"

Hello Experts:

I have made a change to tztab but my system is still "seeing" the old entry. I've checked my entry very carefully and I'm sure that it is ok but the changes are just not taking effect? Any ideas?

TIA,
Greg
I know how to do it in pascal.
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: Tztab "stuck"

Hi Greg:

If you logout and login, have made your '/usr/lib/tztab' modifcation correctly, and specify the correct TZ, you should see the proper time representation.

Try:

TZ=XXX date

where XXX is the modified zone.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Tztab "stuck"

Okay, silly me, I'll believe you and not ask for a before and after tztab listing. I've actually seen this behavior before with "perfect" entries so I will ask you to check a couple of things:

1) Either the dayofmonth OR the weekday MUST be a range. This means that EXACTLY 1 of these MUST be a range.

2) The dayofmonth range must actually cover 7 days. e.g. 1-7, 8-14 --- This isn't documented but nevertheless I've found it to be true.

Please check these things and I still have one more "gotcha" if these are ok.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Tztab "stuck"

The other "gotcha" is that the tztab entry is cached in a static variable so that multiple localtime() calls don't have to re-read the entry --- at least that what the libc patch description says. I've actually seen cases where it seemed to be much better cached than that; so much better, in fact, that restarting the process doesn't fix it --- which flies in the face of the patch description. I've even tried logging out and logging back in and still the change was not "seen". What I have found to work in all cases is this goofy procedure:
1) mv /usr/lib/tztab /tmp/
2) cp /tmp/tztab /usr/lib/
3) chmod 444 /usr/lib/tztab

Do this and if your tztab syntax is correct, I can just about guarantee your changes will be "seen".

You probably should check for libc patches as well but I hardly think that is going to be necessary.
If it ain't broke, I can fix that.
Greg White
Frequent Advisor

Re: Tztab "stuck"

Hi James:

Thanks for your help. I had already tried logging out and logging in and it didn't work. I should have mentioned that. I'm looking at the things A. Clay mentioned now.

Thanks,
Greg
I know how to do it in pascal.
A. Clay Stephenson
Acclaimed Contributor

Re: Tztab "stuck"

Greg, please look at the day of the month ranges and such before trying my last suggestion (the cp,mv) because I want to make certain that I am not insane --- well, not completely insane.
If it ain't broke, I can fix that.
Greg White
Frequent Advisor

Re: Tztab "stuck"

Bingo!!

I did recheck my tztab entry and it was ok. The monthday range did cover one week. I then tried to login from another PC and tztab was still "stuck". Finally, I tried A. Clay's idea of moving and copying the file back and it worked! I didn't even logout. I just reran my script and it used the new entry!!!

You guys are great.

Thanks,
Greg
I know how to do it in pascal.