Reputation: 843
Today I notice this about unix times:
//on my local or any web servers that i work on Brazil
echo strtotime('2016-07-04'); //return 1467601200
//on phptester.net or any other like it
echo strtotime('2016-07-04'); //return 1467590400
Whats happening here? It is not suppose to be equal?
Upvotes: 1
Views: 107
Reputation: 16576
If you take a gander at the PHP time documentation (http://php.net/manual/en/function.time.php) you'll see that php time counts the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). The 0th second of a day in one timezone is different than the 0th second of the day in another timezone, and different php instances may use different timezones.
Upvotes: 2