我需要从PHP中的日期时间变量中减去45分钟.
代码:
$thestime = '2012-07-27 20:40';
$datetime_from = date("Y-m-d h:i",strtotime("-45 minutes",strtotime($thestime)));
echo $datetime_from;
Run Code Online (Sandbox Code Playgroud)
返回结果2012-07-27 07:55.
但应该是2012-07-27 19:55这样.我该如何解决?