Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$selectedDate = "1365465600"; echo $selectedDate;//Output : 1365465600 echo date("Y-m-d",$selectedDate);//Output : 2013-04-09 echo strtotime(date("Y-m-d",$selectedDate));//Output : 1365445800
为什么最后一条语句没有产生输出:1365465600。这里有什么问题?
1365465600
请尝试以下代码,您将得到准确的结果
$selectedDate = "1365465600"; echo $selectedDate; echo date("Y-m-d H:i:s",$selectedDate); echo strtotime(date("Y-m-d H:i:s",$selectedDate));