I get a response from a other server with a date time like below,
"2017-01-10T18:00:00.000Z"
I want to convert this to standard date time like this, how do i do this ?
"2017-01-10 18:00:00"
is there a standard way of doing this ? or do i have rely on the regular expressions to the decode it ?
NOTE:
most people suggest i use below function
echo date("Y-m-d H:i:s", strtotime("2017-01-10T18:00:00.000Z")) . "\n";**
but output i get is wrong from this function is "2017-01-11 05:00:00" not as "2017-01-11 18:00:00" why ? I want as i said "2017-01-10 18:00:00"