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?
date_default_timezone_set() function Vs. putenv(TZ=...)
Moderator: General Moderators
Re: date_default_timezone_set() function Vs. putenv(TZ=...)
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.
I imagine it could be faster.
Re: date_default_timezone_set() function Vs. putenv(TZ=...)
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
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=...)
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.
I think they recommend date_default_timezone_set() since it's the function specifically designed for setting the timezone, whereas putenv() is not.