I have ZendServer CE (PHP 5.2) installed on a Fedora VM, and I have the system timezone set to 'America/Chicago'. I have date.timezone = 'UTC' in my php.ini file, and when I call date_default_timezone_get(), or display date('T') on a web page, it says 'CDT'.
The documentation on php.net for date_default_timezone_get() says it follows this order when choosing a default timezone:
- Reading the timezone set using the
date_default_timezone_set() function
(if any)
- Reading the TZ environment variable
(if non empty)
- Reading the value of the
date.timezone ini option (if set)
- Querying the host operating system
(if supported and allowed by the OS)
If I change the system timezone through the 'setup' GUI, and reboot the server, date('T') returns whatever I changed the system timezone to, regardless of what php.ini says. I also don't have a TZ environment variable, and I am not currently using date_default_timezone_set() anywhere in my code.
Any idea what might be going on? I realize I can always override the system timezone by calling date_default_timezone_set('UTC'), but I'd rather rely on the php.ini file if possible.
Thanks for the help,
Dave