Question

We have a WAMP server running on America/New_York time and a Scheduled task that runs every day at 1.30AM local time or 5.30GMT (6.30 BST).

It ran this morning (8/4/14) but running "date('Y-m-d')" outputs '2014-04-07' even though the unix timestamp is 1396935011 (Tue, 08 Apr 2014 05:30:11 GMT).

What on earth am I missing? Why would it daily tell us it is run the day before even though I know that it definitely hasn't.

Thanks

A

Was it helpful?

Solution

If you are running a scheduled task, can I assume you mean you run a PHP CLI script from Task Scheduler?

If so you will also have to make the timezone change to the \wamp\bin\php\php5.x.y\php.ini file so that the CLI also knows that it is running in the New_York time zone.

date.timezone = "America/New_York"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top