PDA

View Full Version : perl script help time change to 12hr format


techtvman
04-07-2003, 02:50 PM
i have this guestbook script (http://tssguide.gotdns.com/guestbook.zip) and would like to make it when it posts a 12hr format how would i do this?
here is part of the script download the whole script above if need more info it is very small 7k

sub get_time {
my ($min,$hour,$mday,$mon,$year,$wday,@month,@days);
@months =

('January','February','March','April','May','June' ,'July','August','September',' October','November','Decem

ber');
@days = ('Sunday','Monday','Tuesday','Wednesday','Thursday ','Friday','Saturday');

($min,$hour,$mday,$mon,$year,$wday) = (localtime(time+($fix_time*3600)))[1,2,3,4,5,6];
$min = "0$min" if ($min < 10);
$hour = "0$hour" if ($hour < 10);
$mday = "0$mday" if ($mday < 10);
$year += 1900;
$this_day = ("$days[$wday], $months[$mon] $mday, $year at $hour:$min");
}