I have a page that shows some info and the date it was created (server time). I need some method to display the date in both server and user time.
Example:
Oct, 26 13:48:23 (server)
Oct, 26 14:48:23 (your time) -> info
What I have so far:
<?php
$sql=mysql_query("SELECT * FROM table") or die("Come back later");
while($row=mysql_fetch_array($sql)) {
echo date('M, d H:i:s', strtotime ($row['date'])).' -> '.$row['info'];
}
?>
Thank you.
EDIT: I think I did not explain this right. The date is stored in the DataBase (the date is a point in the future for a future event) and I want to show the date in user timezone.
For example, something's going to happen day 26 at 12:10:22 (server time) and I want to show a conversion to user time to make things easier for them.
EDIT 2 Example: With the diffence I want to detect user timezone.