#!/usr/bin/perl -wT use strict; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use CGI ':standard'; use Time::Local; my $input = param('date'); print "Content-type: text/html\n\n"; my $ILLEGAL_CHARS = qr/[^\w:]/; if ($input =~ /$ILLEGAL_CHARS/;) { print "You do not have the right to enter that information"; } my @date = split (/ /, $input); my ($day,$mon,$mday,$hms,$year) = @date; my @date1 = split (/:/, $hms); my ($hour,$min,$sec) = @date1; my %mon_writ = ( Jul => '6', Aug => '7', Sept => '8', Oct => '9', ); $mon = $mon_writ{key}; ($sec, $min, $hour, $mday, $mon, $year) =~ s/^0+//; $year = $year - 1900; my $TIME = timegm($sec, $min, $hour, $mday, $mon, $year); print $TIME;