1833838 Members
2510 Online
110063 Solutions
New Discussion

DST Testing

 
SOLVED
Go to solution
vpons
Frequent Advisor

DST Testing

I read a couple of threads and all suggest that use perl to test new tztab file for DST setting.

Can you please suggest anyother method to test if the DST changes have taken into effect?

I will be deploying the tztab file that I extracted from the patch tonight.

11 REPLIES 11
Robert-Jan Goossens_1
Honored Contributor
Solution

Re: DST Testing

A. Clay Stephenson
Acclaimed Contributor

Re: DST Testing

Of course there is. Make your tztab changes either manually or preferably with a patch and then set your system date ahead to about 2 hours before the expected transition. Wait for the transition and then set the date ahead to about 2 hours before the next transtion and see if all was as expected. Next, use the date command to set the time backwards to the correct time.

Your final step should be to hit yourself over the head with a baseball bat because almost certainly you have clobbered database timestamps and file timestamps so don't complain if your data are inconsistant or your makefiles no longer work.
If it ain't broke, I can fix that.
vpons
Frequent Advisor

Re: DST Testing

Sure clay! I am aware of the mess the time change will create and I do not want to try on the only server(production) that I have.

My system does not recognize your script.
I get the following output with
perl -v

This is perl, v5.6.0 built for PA-RISC1.0

Copyright 1987-2000, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.


And I have perl under
./usr/bin/perl
./usr/contrib/bin/perl
./usr/perl5/bin/perl

I tried running your script under all the three but it does does not work

# dst.pl -y 2006
sh: dst.pl: not found.
[root@sloss58]/usr/perl5/bin

TZ=CST6CDT dst.pl -y 2006
sh: dst.pl: not found.
[root@sloss58]/usr/perl5/bin

Any suggestion?
A. Clay Stephenson
Acclaimed Contributor

Re: DST Testing

Your problems have nothing to do with Perl and everything to do with the shell. You are simply being told that dst.pl is not found anywhere in your current PATH. It's also possible that you haven't set the executable bit on the file. In any event, your problems aren't covered in Perl 101 but rather in Shell 101.


Because your perl -v works and points to perl 5.6, you should have no trouble.

cd to whatever directory you downloaded dst.pl to.

chmod 755 dst.pl

./dst.pl

and you should be fine.




If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: DST Testing

Hi:

# ./dst.pl -y 2006

...would work better as root unless you have "." in root's PATH (which I hope you do not!).

You can never go wrong using an absolute path name for execution, either.

Regards!

...JRF...
vpons
Frequent Advisor

Re: DST Testing

Hello!

Can you please send me the dst.pl script?
vpons
Frequent Advisor

Re: DST Testing

Hello!

Can you please attach the dst.pl script?
James R. Ferguson
Acclaimed Contributor

Re: DST Testing

Hi:

There are many posts with Clay's script. Here's a recent one:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1104045

Regards!

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

Re: DST Testing

Oh, your problems are much more fundamental than PATH problems. I am not trying to insult you but if you are having problems as trivial as this, you should not have root access and should not be allowed to patch anything. "Fixing" DST may be the least of your systems problems. Someone has put you in the pilots seat and asked you to fly without sending you to flight school first.
If it ain't broke, I can fix that.
vpons
Frequent Advisor

Re: DST Testing

Thanks Clay!
vpons
Frequent Advisor

Re: DST Testing

Hey Guys!
I have assigned you points.

Thanks for help.

Script was great and I got the desired output.