PDA

View Full Version : Time Problem


Dark_Wizard
01-23-2002, 12:41 AM
I am trying to figure out why my dropdown box is off by 6 hours. Here is the code I have:


$i = '0';
while ($i < '28'){
$timestamp = mktime(0,0,0,date('m'),date('d') + $i,date('Y'));
$date = date('M d',$timestamp);
echo ("<OPTION value=\"$timestamp\">$date\n");
$i++;
}

echo ("</SELECT></td></tr>\n");
echo ("<td align=right>Time: </td><td><SELECT name=\"timeid\">\n");

$i = '0';
while ($i < '48'){
$timestamp = $i * 1800;
$time = date('g:i A',$timestamp + 82800);
if ($time == "19:00") {
echo ("<OPTION selected value=\"$timestamp\">$time\n");
}
else {
echo ("<OPTION value=\"$timestamp\">$time\n");
}
$i++;
}


Any help would be appreciated....TIA!

Admin
01-23-2002, 07:50 AM
Didn't look at the code, but from your question maybe the server has an offset of 6 hours?

Dark_Wizard
01-23-2002, 10:43 AM
Originally posted by FireFly
Didn't look at the code, but from your question maybe the server has an offset of 6 hours?

Thx for the reply Firefly, I though of that as well but the server is in the same timezone and is set correctly. I can post the full hack here if needed. TIA!