create a DateTime object with string datetime.


$dateString = 'Wed, 28 Dec 2011 13:04:30 GMT';
$dateTime = Datetime::createfromformat('D, d M Y H:i:s e',$dateString);

echo $dateTime->format('d-M-Y H:i:s e');
well, this is the answer.

评论

热门博文