PHP Date() does not match timezone set in php.ini -
i have server needs use est time. have set date.timezone = america/new_york in php.ini, , confirmed using phpinfo(); indeed see date.timezone , default timezone show america/new_york in phpinfo().
when try echo date() php via terminal, time in pst instead of est (3 hours behind):
php -r "echo date('y-m-d h:i:s');"
the server time set america/los_angeles, updated , rebooted machine. when ask server time, time in est expected:
date
so server timezone , php.ini timezone both set correctly, yet php date() function still gives me time 3 hours behind. i'm echoing terminal i'm positive it's not in php project files themselves.
what causing this?
Comments
Post a Comment