Forum Moderators: coopster
putenv("TZ=Europe/Amsterdam");
$date_time = "2009-10-20 10:00:12";
However if someone from the U.S views the time, it will be innacurate because of the GMT + 0200 difference.
How do I detect timezones in PHP then perform the edit to display the time difference? i.e 2009-10-20 08:00:12 which is what it should show in areas of the U.S.
I have considered strtotime, but cannot detect the time zone, nor figure out how to convert back to MYSQL date time stamp.
Thanks.
oh! Interesting! There is a whole new class called DateTime which has been introduced since last time I looked at this stuff!
[au.php.net...]
I need to know what timezone I am in, so I can get the offset from GMT, and apply that to my date time.
Any ideas? This is a user by user case on the fly.