Among other ways:
echo strftime('%Y-%m-%d %H:%M:%S', strtotime('2008-12-02 20:50:00Z'));
or
echo date('Y-m-d H:i:s', strtotime('2008-12-02 20:50:00Z'));
prints:
2008-12-02 15:50:00
(U.S. Eastern Standard Time)
(Note: the 'Z' at the end of the string is important - it means the
input is in Zulu (UTC) time).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================
Thank you Jerry:
I think that would work if the user selects a timezone and I set that
timezone on the website using date_default_timezone_set(). The
problem is, when I need to write a date/time back to the database, I
need to set the timezone back to UTC. Is there anything I can do to
convert on the fly rather than constantly switching back and forth
with the date_default_timezone_set() function?
php.net is your friend.
http://www.php.net/manual/en/function.gmstrftime.php
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================