1

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.

Rejoanul Alam
  • 5,435
  • 3
  • 39
  • 68

1 Answers1

2

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');

demo

Glavić
  • 42,781
  • 13
  • 77
  • 107