#!/usr/bin/perl use Time::Local; # TIME example: '989331323' $time = time(); # GMTIME example: '15, 22, 14, 8, 4, 101, 2, 127, 0' ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime( time() ); # LOCALTIME example: '15, 22, 10, 8, 4, 101, 2, 127, 1' ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime( time() ); # TIMELOCAL example: '989331323' $seconds = timelocal($sec,$min,$hour,$mday,$mon,$year); # FIXING THE DATE $year = $year + 1900; # year starts at 1900 $mon = $mon + 1; # month is zero-based $wday = $wday + 1; # day of week is zero-based $yday = $yday + 1; # day of year is zero-based # DAYLIGHT SAVINGS TIME if( $isdst > 0 ) { $isdst = "Daylight Savings Time is in effect"; } elsif( $isdst == 0 ) { $isdst = "Daylight Savings Time is not in effect"; } elsif( $isdst < 0 ) { $isdst = "Information not available"; }