[eluser]gunnarflax[/eluser]
If I want users to be able to see the post time on all updates to a site in their own timezone, what do I need to do to achieve that? How will I store the time in the database and how should I load the time? Is Unix timestamps a good way of achieving this?
[eluser]toopay[/eluser]
You can use any datatype, but it is easier working with integer/Unix timestamps, since to get gmt date, you can instantly write
Code:
$GMT_date = gmdate('D, d M Y H:i:s \G\M\T', $unix_time));
[eluser]gunnarflax[/eluser]
Sweet! thanks! If I want to adjust the time to someone living in a timezone +4 and my server is in +1, should I just add the number of seconds to the $unix_time variable?