Click to See Complete Forum and Search --> : working with time and date (for auction)


TinaBanana
08-21-2003, 02:28 PM
ive been playing this is amazing script auction, it was so easy to setup i was amazed.

now the only thing that is bothering me is the date isnt displaying properly.

when it lists the current time its way off...not only with hours but with the minutes too, im not quite sure where its getting the time.

you can see the auction here, everything is still in the testing stage.
http://www.modeltractors.com/cgi-bin/auction.pl?category=tractors&item=1061573242

for example right now on my computer its 3:25
but on the page it says 12:09:55

i would like 2 things...to fix the time so its using the same time as i have and to make that, time remaining feild work.
i tried something simple but ofcourse it didnt work. i realize i have to substract only the time and i trying to use the time and date (i think)

here is the peice of code that controls the date

my $nowtime = localtime(time);
my $closetime = localtime($form{'item'});
my $timeremaining = $nowtime - $closetime;

and it gets called down the script, let me know if you need to see more code.