I have met a very strange problem
the code is:
$timeStr = '2012-12-27 10:01:00';
$test = date('Y-m-d H:m:s',strtotime($timeStr));
echo ("timeStr : $timeStr <br/> time: $test");
the result is:
timeStr : 2012-12-27 10:01:00
time: 2012-12-27 10:12:00
why they are not equal ?
Change
mtoi.mis for months whileiis for minutes. It should beFurther reference https://www.php.net/manual/en/function.date.php