I'm using the Envato API to verify purchases made on their site, and the date/time outputted as part of an API query for the purchase is like so:
Wed May 20 06:37:57 +1000 2015
Firstly, what format is this in (is there a name for it, and also in terms of the PHP date/time format?) and secondly how can I convert this into a different format?
When I use the strtotime()
function and then date()
as below, the output seems to be wrong by a few hours. Could this be because of a different in time zones between Envato (Australia) and me (England) or am I missing something?
$old = strtotime("Wed May 20 06:37:57 +1000 2015");
echo date('Y-m-d H:i:s', $old);
The above outputs the following: 2015-05-19 22:37:57
.
Any help would be much appreciated, thanks!