下面的代码...PHP,日期()不返回正确的日期/时间
$date = "02-13-2012";
$start_time = "17:30";
$end_time = "20:00";
$start_timestamp = date("m-d-Y H:i",strtotime($date." ".$start_time));
$end_timestamp = date("m-d-Y H:i",strtotime($date." ".$end_time));
print($start_timestamp);
print($end_timestamp);
返回...
1969-12-31 19:30:00
1969-12-31二十时30分零零秒
没有人有任何想法,为什么这不能正常工作?
试试这个$ date =“2012-02-13”; – busypeoples 2012-02-14 01:58:13
好问题:)。我在一次过去 – 2012-02-14 02:00:07