Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DST - How to verify (no APAR) 3

Status
Not open for further replies.

ChuckerBob

Technical User
Mar 8, 2005
8
US
I need to apply the TZ environmental variable fix for the DST issue. I was told not to apply an APAR fix or ML update because our systems are being used extensively this time of year (taxes).

The systems in question are running AIX 5.2 ML07.
I have verified that the APAR does not exist on the systems:
-------------------------------------------------------
# instfix -iak IY75213
There was no data for IY75213 in the fix database.
-------------------------------------------------------

Since I cannot apply a fix or ML, how can I verify that the TZ variable fix updated the system correctly?
What command can I run to verify the current DST settings?

I have found a lot of information on how to set the TZ variable, but I have found nothing to tell how to verify that the system has corrected the DST issue, other than to verify that an APAR fix was installed.
Thanks in advance.
 
DukeSSD,
Thanks for the reply.
I did look at the link that you sent me to.
There is a lot of information there; however, what I am looking for is a way to verify that the TZ environment variable fix for the DST worked.
I was hoping that there was a command that I could use that would show me the current settings for the DST date.
I know how to verify that a fix or patch is applied to the system, but I was instructed to NOT install patches or fixes. I can only perform the TZ fix.
I have looked around in smit and on the web (including google groups) and all I can find is the instructions to verify that an APAR or fix is applied.
Any information regarding this would be greatly appreciated.
Thanks,
 
If you want to try the TZ setting out for yourself, all you need to do is start a shell session and modify the TZ value for that session only.

I.e.

date shows now 14:45:00 EST feb 2 2007

$ TZ=EST5DST,M2.0.5/15,M2.0.5/17
-or-
$ TZ=EST5DST,M2.1.5/15,M2.1.5/17
(not sure how the weeks are counted, but you can experiment)
$ export TZ
$ echo $TZ
$ date
$ date
...

keep on running date until you see the TZ change from EST to DST (and the time leap 1hr forward) and then 2hrs later see it change back to EST.

Don't worry, setting a different TZ for your shell session only modifies the way the date/time is printed, it doesn't alter the system clock and it doesn't harm any running software. In fact that is the only thing that TZ does: it modifies the way the computer's realtime clock is interpreted and how the date/time is displayed.

If you are satisfied, then modify the TZ in /etc/environment using the strings provided for the real changeover dates, not the ones in this post. After changing the TZ in /etc/environment it is necessary to reboot the server BEFORE the DST begin date for the change to affect all background processes. especially cron.


HTH,

p5wizard
 
p5wizard,
Thanks for the info.
I think that what you are telling me is that I need to look for DST from the date command output instead of EST.
That info is very helpful.
Do you know of a way to check the system to see what the setting is for the date that the DST will start and end?
Thanks again for the information.
 
from IBM developerworks website:

To answer the comment by SCG:

The TZ environment variable is in fact the means of controlling the timezone settings, whether the APARs are installed or not.

Consider three scenarios:
1) The TZ variable is set and indicates no DST is observed. In this case, the APAR has no impact, because no timechange will occur in the first place.

2) The TZ variable is set and specifies DST is in effect, and it specifies the specific start and stop rules for the desired location. In this case, again, the APAR has no impact. The TZ variable DST rule is the final word.

3) The TZ variable is set and says DST is in use, but there is no TZ indication for when to start and stop observation of DST. This is the case where the default rule is used, which is where the APAR comes into play starting in 2007.
The default through 2006, if set explicitly, would look like: M4.1.0,M10.5.0
(M4.1.0 = Month 4 [apr], week 1, day 0 [sun])
The default starting in 2007 is like manually setting the rule to this: M3.2.0,M11.1.0

In other words, for locations that set their full TZ variable including a DST rule, the APAR has no impact and is not relevant.


Posted by David Clissold on Nov 10 2006, 02:34:41 PM EST


So if you have a TZ setting with a DST rule in it, it will work regardless if you have the APAR installed or not.

the rule is
Mmb.wb.db/tb,Mme.we.de/te
mb=month that DST begins
wb=week of month mb that DST begins
db=weekday of week wb that DST begins
tb=time that DST begins
me=month that DST ends
we=week of month me that DST ends
de=day of week we that DST ends
te=time that DST ends

if tb or te are omitted, the system uses 1:00->2:00 and 2:00->1:00 I believe
db and de are 0 to 6 for sun to sat
wb and we are 1 to 5 for 1st week to last week of month
mb and me are 1 to 12 for jan to dec


HTH,

p5wizard
 
Thanks p5, I knew you would be a better person for the job.
Well worth the star.
 
heck yah..star deserved!

you amaze me with your AIX/Unix knowledge!
 
mag007 said:
you amaze me with your AIX/Unix knowledge!

Well, I've been around in the AIX world from way back when, even before RS6000s - about 15 years worth of experience...



HTH,

p5wizard
 
Yeah well if that's the place where i can show my appreciation, I really appreciate having you p5wizard around in this forum
 
Yeah well if that's the place where i can show my appreciation, I really appreciate having you p5wizard around in this forum

Ditto, pulled me out of many fires and drills

Well, I've been around in the AIX world from way back when, even before RS6000s - about 15 years worth of experience...

At first, I though you were a developer, because the depth of knowledge and detail. For a person doing AIX for about 4-5 years, you are a good role model :)

 
After the apar is applied, is it possible to verify the date the change with occur...or is everyone just trusting it (and testing it)?

For Example (standard DST/CST default):
TZ=CST6CDT

Where do the rules for CST6CDT reside....libc.a? I'm more so just curious than anything.










 
The rules are not in a zoneinfo file/database like on other UNIXes I've come across...

I believe they are (hard?)coded and reside somewhere in a library - might well be libc.a.

If you don't trust that code, either run through the changedates on a test server or apply the TZ value with the DST/ST rule like posted above. But seeing as you've trusted the code for the changeover dates before 2007...


HTH,

p5wizard
 
Other Unix use zdump which reads from the zoneinfo files but as noted, AIX doesn't use zdump. If you run 'zdump -v CST6CDT | grep 2007' you will notice the incorrect information even if you have the correct APAR installed. IBM does have an APAR to fix zdump but it isn't required for DST.

And I have 12 years of AIX experience, including SPs and Regattas! I like big iron! [bigsmile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top