use Time::Local; # Second - Min - Hour - Day - Month - Year my $starttime = timelocal($seconds, $mins, $hours, $day, $month, $year);