#! /usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
@months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
@weekDays = qw(Sun Mon Tue Wed Thu Fri Sat Sun);
($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime();
$year = 1900 + $yearOffset;
$theTime = "$hour:$minute:$second, $weekDays[$dayOfWeek] $months[$month] $dayOfMonth, $year";
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD><TITLE>Time Check</TITLE></HEAD>\n";
print "<BODY>\n";
print "<H2>Time Check</H2> <br /> \n";
print "<H3>$theTime</H3>" ;
print "</BODY>\n";
print "</HTML>\n";