When date.timezone in php.ini is commented out, it gives me:
A PHP Error was encountered Severity: Warning Message: main(): It
A PHP Error was encountered
Severity: Warning
Message: main(): It
date.timezone is intended to go in your php.ini or .htaccess file.
you could do an ini_set('date.timezone', 'America/Los_Angeles'); in the first line of your script and get the desired results.
ini_set('date.timezone', 'America/Los_Angeles');