Hi I was looking for a script how to find from the localtime of my os (Unix) that wether the daylight saving is on or off and on the basis of same conver the GMT to CST or CDT.
I have done the same in perl which is
my $sec;
my $min;
my $hour;
my $mday;
my $mon;
my $year;
my $wday;
my $yday;
my $isdst;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
if ($isdst=0)
{
print("no\n");
$date = &Date_ConvTZ($date,"GMT","CST");
print $date;
}
else
{print("yes\n");
$date = &Date_ConvTZ($date,"GMT","CDT");
print $date;
}
but i want the same code in TCL.
Thanks In Advance
Neeraj Lal
I have done the same in perl which is
my $sec;
my $min;
my $hour;
my $mday;
my $mon;
my $year;
my $wday;
my $yday;
my $isdst;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
if ($isdst=0)
{
print("no\n");
$date = &Date_ConvTZ($date,"GMT","CST");
print $date;
}
else
{print("yes\n");
$date = &Date_ConvTZ($date,"GMT","CDT");
print $date;
}
but i want the same code in TCL.
Thanks In Advance
Neeraj Lal