Seems like you can safely define it for a single run of any script or anything where you don't need to factor in a timezone change. Unless I've mistaken everything I've read.
To personalize PHP execution I used to putenv("TZ=America/Los_Angeles") for example at the top of a script based on the user's desired timezone. It wound up making all the other time based calls localized which was great.
date_default_timezone_set() is how I do it now, I wonder if it's as efficient (I should strace it)
To personalize PHP execution I used to putenv("TZ=America/Los_Angeles") for example at the top of a script based on the user's desired timezone. It wound up making all the other time based calls localized which was great.
date_default_timezone_set() is how I do it now, I wonder if it's as efficient (I should strace it)