use Time::Local; $time = timelocal($sec,$min,$hour,$mday,$mon,$year); $time = timegm($sec,$min,$hour,$mday,$mon,$year); my ( $mday, $mon, $year ) = split '/', "01/12/2008"; $mon -= 1; # Time::Local uses months 0..11 like gmtime() and localtime(). my $epoch_time = timegm(1,0,0,$mday,$mon,$year); # 1 second past midnight