Hello,
When I run a very simple script using mktime() to echo epoch time for any given time, I get the following warning:
Warning: mktime(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PST/-8.0/no DST' instead in /Library/WebServer/Documents/btb_sandbox/date_time_unix.php on line 7
Looking into the php.ini file which my php install is using (according to phpinfo()), I see that date.timezone is already correctly set.
995 ; Defines the default timezone used by the date functions
996 ; http://php.net/date.timezone
997 date.timezone = 'America/Los_Angeles'
Clearly, the timezone identifier is not misspelled in php.ini. Must the timezone be declared explicitly within my php code if I want to use the mktime() function? I'm not sure where it's retrieving that value, 'PST/-8.0/no DST'.
I have to guess there is a very fundamental configuration I am overlooking somewhere, but it is not apparent to me.
Any help is much appreciated.
Thanks,
Ben