bruceleejr
06-19-2010, 06:55 PM
http://www.mujak.com/test/test3.php
I am Mountain Standard Time(MST), Phoenix Arizona but how do I display the correct time~??
As you can see in the "posts" cell the time is incorrect. The last post displays 5:47pm when its 10:47am. Its 7 hours ahead. How do I fix this~??
<div style="position:relative;left:10px;">
<?php
$con = mysql_connect("mujak.com","rootkbc1_muser","******");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("rootkbc1_halo2x", $con);
$result = mysql_query("SELECT * FROM mybb_posts LEFT JOIN mybb_userfields ON (mybb_posts.uid = mybb_userfields.ufid) WHERE fid=42 ORDER BY pid DESC LIMIT 0,3");
echo "<center><table border=1 bgcolor=white>
<tr>
<th><h3>Subject</h3></th>
<th><h3>Posts</h3></th>
<th><h3>Username</h3></th>
<th bgcolor=#C0CFFA><h1>XBC</h1></th>
<th bgcolor=#C9FFC2><h1>XLK</h1></th>
<th><h3>Team</h3></th>
<th><h3>Console</h3></th>
<th><h3>Location</h3></th>
<th><h3>Bandwidth</h3></th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td style='-moz-border-radius:9px;padding:5px;'bgcolor=#9CDCFF><b>" . $row['subject'] . "</b></td>";
echo "<td style='-moz-border-radius:9px;padding:5px;font-size:10px;'bgcolor=#C9ECFF>" . gmdate("D F j, Y, g:i a", $row['dateline']) . "<br>" . $row['message'] . "</td>";
echo "<td bgcolor=#C9ECFF>" . $row['username'] . "</td>";
echo "<td bgcolor=#C0CFFA>" . $row['fid5'] . "</td>";
echo "<td bgcolor=#C9FFC2>" . $row['fid6'] . "</td>";
echo "<td bgcolor=#C9ECFF>" . $row['fid9'] . "</td>";
echo "<td bgcolor=#C9ECFF>" . $row['fid7'] . "</td>";
echo "<td bgcolor=#C9ECFF>" . $row['fid1'] . "</td>";
echo "<td bgcolor=#C9ECFF>" . $row['fid8'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con)
?>
</div>
I am Mountain Standard Time(MST), Phoenix Arizona but how do I display the correct time~??
As you can see in the "posts" cell the time is incorrect. The last post displays 5:47pm when its 10:47am. Its 7 hours ahead. How do I fix this~??
<div style="position:relative;left:10px;">
<?php
$con = mysql_connect("mujak.com","rootkbc1_muser","******");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("rootkbc1_halo2x", $con);
$result = mysql_query("SELECT * FROM mybb_posts LEFT JOIN mybb_userfields ON (mybb_posts.uid = mybb_userfields.ufid) WHERE fid=42 ORDER BY pid DESC LIMIT 0,3");
echo "<center><table border=1 bgcolor=white>
<tr>
<th><h3>Subject</h3></th>
<th><h3>Posts</h3></th>
<th><h3>Username</h3></th>
<th bgcolor=#C0CFFA><h1>XBC</h1></th>
<th bgcolor=#C9FFC2><h1>XLK</h1></th>
<th><h3>Team</h3></th>
<th><h3>Console</h3></th>
<th><h3>Location</h3></th>
<th><h3>Bandwidth</h3></th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td style='-moz-border-radius:9px;padding:5px;'bgcolor=#9CDCFF><b>" . $row['subject'] . "</b></td>";
echo "<td style='-moz-border-radius:9px;padding:5px;font-size:10px;'bgcolor=#C9ECFF>" . gmdate("D F j, Y, g:i a", $row['dateline']) . "<br>" . $row['message'] . "</td>";
echo "<td bgcolor=#C9ECFF>" . $row['username'] . "</td>";
echo "<td bgcolor=#C0CFFA>" . $row['fid5'] . "</td>";
echo "<td bgcolor=#C9FFC2>" . $row['fid6'] . "</td>";
echo "<td bgcolor=#C9ECFF>" . $row['fid9'] . "</td>";
echo "<td bgcolor=#C9ECFF>" . $row['fid7'] . "</td>";
echo "<td bgcolor=#C9ECFF>" . $row['fid1'] . "</td>";
echo "<td bgcolor=#C9ECFF>" . $row['fid8'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con)
?>
</div>