Print out the current time in standard time
#!/usr/local/bin/perl -w
my $time = time;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime ($time);
my $newtime = $time - ($isdst * 3600);
my $stdtime = localtime ($newtime);
my $daytime = localtime ($time);
print "The current daylight time is: $daytime\n";
print "The current standard time is: $stdtime\n";
Related examples in the same category