Following best practice to not modify php.ini directly but to have separate files, I have the following file:
$ cat /etc/php/7.0/apache2/conf.d/99-timezone.ini
[Date]
date.timezone="America/Los_Angeles"
I can see that the ini file is being loaded as evidenced by this phpinfo screenshot. However in the date section only one of the two directives has updated to show America/Los_Angeles and one is UTC. I don't even know where UTC is coming from, as the system's time is not UTC:
$ timedatectl
Local time: Tue 2017-11-07 18:36:56 PST
Universal time: Wed 2017-11-08 02:36:56 UTC
Timezone: America/Los_Angeles (PST, -0800)
(snip)
I see the following outputs when I run each of these:
var_dump(ini_get('date.timezone')); //string(19) "America/Los_Angeles"
var_dump(date_default_timezone_get()); //string(3) "UTC"
var_dump(date('e')); //string(3) "UTC"
How do I get the first two to local time?