<?php

if (!isset($gfcookie[15]))
{
    $gfcookie[15] = 0;
}

if ($showseconds != "1")
{
    $time = substr("$time", 0, 5);
}
$timearray = explode(":", $time);
$timearray[0] -= $gfcookie[15];
$timearray[0] += $timeoffset;
$time = implode(":", $timearray);
if ($show24hour != "1")
{
    $timearray = explode(":", $time);
    if ($timearray[0] < 13)
    {
        $am = "am";
    }
    else
    {
        $timearray[0] -= 12;
        $am = "pm";
    }

    if ($timearray[0] == 0)
    {
        $timearray[0] = 12;
    }
    if ($timearray[0] == 12)
    {
        $am = "pm";
    }
    $time = implode(":", $timearray);
}

?>