I am running XAMPP on mac.
I have a very simple script:
<?php
echo time();
always returns time in the 1970.
example: 1475044574 (Edit: 1475137157)
I tried setting the timezone in php.ini and then calling date_default_timezone_get() and it returns the correct set value.
I tried adding SetEnv TZ MyTimezone to httpd.conf (at the bottom of the file) and it did not work.
I also tried setting the timezone in php with date_default_timezone_set() and though it sets successfully, time is still in 1970.
I tried the same script on MAMP and still the same problem.
Any suggestion is appreciated!