Page 1 of 1
date_default_timezone_set() function Vs. putenv(TZ=...)
Posted: Sun Aug 02, 2009 12:56 pm
by plus200
Saw an old discussion about date_default_timezone_set() function Vs. putenv(TZ=...)
It was said there that date_default_timezone_set() is the better way to do that.
How is it better?
Re: date_default_timezone_set() function Vs. putenv(TZ=...)
Posted: Sun Aug 02, 2009 1:09 pm
by jackpf
I'm not entirely sure...but why not use the function that's designed for setting the timezone to....set the timezone?
I imagine it could be faster.
Re: date_default_timezone_set() function Vs. putenv(TZ=...)
Posted: Sun Aug 02, 2009 1:22 pm
by plus200
Well, I'm trying to do thing because I have a reason for "why yes" and not "why not"
People here were pretty decisive that date_default_timezone_set() is better, they just didn't say how.
Here is the original discussion:
viewtopic.php?f=1&t=100789
Re: date_default_timezone_set() function Vs. putenv(TZ=...)
Posted: Sun Aug 02, 2009 1:36 pm
by jackpf
Yeah...I see what you mean
I think they recommend date_default_timezone_set() since it's the function specifically designed for setting the timezone, whereas putenv() is not.
Re: date_default_timezone_set() function Vs. putenv(TZ=...)
Posted: Sun Aug 02, 2009 2:17 pm
by plus200
10x