Larry Martell wrote:
No, I don't - this app runs in different locations all over the world.
I found some code at php.net that does this:
date_default_timezone_set(@date_default_timezone_get());
$deftz = date('T');
And that is working for me and giving me what I need.
But do you ACTUALLY know what time zone is stored IN the database? What if te
database was from another server?
One of the 'standards' adopted when working world wide is to ensure what is
stored IN the database is always UTC based. So you can always compare times on
the same consistent base. The only time you need the offset is to display a
local time, and that is either the time local to the server, or the time local
to the client.
The 'default' timezone is not necessarily the right one in either case ;)
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php