Here is my Perl script that I used in this article...
Code:
#! /usr/local/bin/perl
sub printtime($)
{
@d=localtime $_[0];
printf "%12d %3s %4d-%02d-%02d %02d:%02d:%02d %s\n", $_[0],
(Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$d[6]],
$d[5]+1900,$d[4]+1,$d[3],$d[2],$d[1],$d[0],
("Standard Time","Daylight Saving Time")[$d[8]];
}
while (do {print "Enter val - "; chomp($val = <>)}) {
print "val = ", $val, "\n";
printtime $val;
printtime $val+1;
}
print "\n";
This is how I verify that the timezone data is correct. I just calculate by hand the second when I expect the Daylight Saving to toggle and I use this script to see if it does...