I have my database setup so that when a user posts a comment, it adds a timestamp when they post it.
I can retrieve the time from the database using the following code (in a loop):
Code: Select all
$time = date("g:i a", strtotime(mysql_result($result,$i,"date")));I have used the following, but cant get it to work with a time from the database rather than just the current time:
Code: Select all
putenv ('TZ=Europe/London');Code: Select all
date_default_timezone_set