Setting the environment variable for timezones ...

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
So I can't figure out what exactly is going wrong here ... I'm using
I'm accessing a server in Dublin from Seoul. I need to be able to
translate times into various timezones across the world. Simple
addition isn't the best because it doesn't take into account Daylight
Saving Times etc ....

What I'm doing is setting the TZ environment variable to my preferred
timezone and then calling a date function to get the hour ...

echo date('G');

... unfortunately it doesn't work and I don't know why.
TZ is definitely set when I call my date function ... but it always
returns dublin time regardless of the TZ environment variable .... ?

Help ...

Re: Setting the environment variable for timezones ...

dbee wrote:
Quoted text here. Click to load it

This works for me on PHP 4.3.4, 4.4.2 and 5.1.2 on Linux.

Site Timeline