As of PHP5.3 (I think) it became a requirement for the date.timezone to be set in the php.ini file, or to be set at runtime via the date_default_ti
I'd probably use the date_default_timezone_get() function:
string date_default_timezone_get ( void )In order of preference, this function returns the default timezone by:
- Reading the timezone set using the date_default_timezone_set() function (if any)
- Reading the TZ environment variable (if non empty) (Prior to PHP 5.3.0)
- Reading the value of the date.timezone ini option (if set)
- Querying the host operating system (if supported and allowed by the OS)
http://www.php.net/manual/en/function.date-default-timezone-get.php