convert soap time in PHP convert soap time in PHP php php

convert soap time in PHP


$time_other_format = '2013-10-29T08:34:01-0700';$dt = new DateTime($time_other_format);echo $dt->format('Y-m-d H:i:s');

This will echo,

2013-10-29 08:34:01

The DateTime class in PHP is very powerful, and will recognise almost any format you throw at it. It's great for manipulation.