I'm trying to convert string date time to datetime format. bellow is my code
date_default_timezone_set("Asia/Singapore");
$EventDate = '2018-09-14 16:30:00.000';
$createDate = new DateTime($EventDate);
$NewEventDate = $createDate->format('Y-m-d h:m:s');
but when i convert string date to datetime, i get time wrong bellow is the output
STRING EVENT DATE : 2018-09-14 16:30:00.000
CONVERTED EVENT DATE : 2018-09-14 04:09:00
the time 16:30:00 shows 04:09:00 which is wrong
H
instead ofh
i
is minutes, no?