cozzy1984
03-15-2008, 12:31 AM
Got my website almost complete but hvaing problems deciding what to do with the Date and the way to manage the timestamps in the mysql database. The server seems to be +2hrs and as most of my timestamps or updated on current by the database, ive been trying to convert the timestamps -2hrs.
Only problem is im trying to get the timestamp from the database -2hrs and display it in the correct format.
while($lastactive_row = @mysql_fetch_array($lastactive_result))
{
$lastactive_username = $lastactive_row["username"];
$lastactive_date = date("d M y H:i", strtotime($lastactive_row["last_active"]));
just dont know the best way to do this, i thought that it was just a matter of adding -2hours before or after $lastactive_row["last_active"] but its not working.
Any ideas?
Only problem is im trying to get the timestamp from the database -2hrs and display it in the correct format.
while($lastactive_row = @mysql_fetch_array($lastactive_result))
{
$lastactive_username = $lastactive_row["username"];
$lastactive_date = date("d M y H:i", strtotime($lastactive_row["last_active"]));
just dont know the best way to do this, i thought that it was just a matter of adding -2hours before or after $lastactive_row["last_active"] but its not working.
Any ideas?