$thedate = "2014-11-01 00:32";
echo $thedate; = 2014-11-01 00:32 = ok
$pd = date("Y-m-d", strtotime($thedate));
echo $pd; = 2014-11-01 = ok
$dow = date("l",$pd);/$dow = date("w",$pd);
echo $dow; = Wednesday/3 = not OK - 2014-11-01 is Saturday/6
我认为这个日子和月份都不合适,但1月11日也是星期六。怎么了?
答案 0 :(得分:1)
您将字符串( 2014-11-01 在$pd
中)作为第二个参数传递,而不是date
函数的时间戳