Reputation: 5398
Palpal sandbox IPN returning datetime as Mon Jun 15 2015 12:04:00 GMT+0600 (Azores Standard Time)
. How to format this in PHP? Please look at my date format. This is not duplicate.
Upvotes: 1
Views: 807
Reputation: 43552
If you remove (Azores Standard Time)
your date will become valid, and then you can use strtotime()
or DateTime
:
$string = 'Mon Jun 15 2015 12:04:00 GMT+0600 (Azores Standard Time)';
$string = substr($string, 0, strrpos($string, '(') - 1);
$dt = new DateTime($string);
echo $dt->format('c \o\r U');
Upvotes: 2