Incorrect timezone set in php.ini
-
It seems like my /usr/local/etc/php.ini has this line set
date.timezone="Etc/UTC"
when clearly /etc/rc.php_ini_setup contains the following code:
unset TIMEZONE # Fetch the timezone from /var/db/zoneinfo if present if [ -f /var/db/zoneinfo ]; then TIMEZONE=$(cat /var/db/zoneinfo) fi if [ -z "${TIMEZONE}" ]; then # Second option is from config.xml TIMEZONE=$(/usr/local/sbin/read_xml_tag.sh string system/timezone) fi if [ -z "${TIMEZONE}" ]; then # Last option, use default value from $g or Etc/UTC TIMEZONE=$(/usr/local/sbin/read_global_var default_timezone "Etc/UTC") fi
Anyone spot anything wrong? I verified the timezone is correct by running the script /usr/local/sbin/read_xml_tag.sh string system/timezone
-
Out of curiosity, is your timezone in System > General Setup set to Etc/UTC?
-
No, running root: /usr/local/sbin/read_xml_tag.sh string system/timezone gives me:
America/Vancouver
-
Did you reboot after changing the timezone from UTC? Guessing not, some things will be on the old timezone until a reboot, php.ini among those. If I set my tz to America/Vancouver, and either reboot or run rc.php_ini_setup, I correctly get:
: grep timez /usr/local/etc/php.ini date.timezone="America/Vancouver"