use Time::Local; #These are the inverse functions of localtime() and gmtime() #which are Perl "built-in functions".. (no "use" statement needed) $time = timelocal($sec,$min,$hour,$mday,$mon,$year); $time = timegm($sec,$min,$hour,$mday,$mon,$year);