PHP date() 输出错误的日期


php date() outputting wrong date

我正在尝试以下代码:

日期('d F Y', '2013-09-14 00:00:00')

我期待回来

14 九月 2013

相反,我得到的是

1969 年 12 月 31 日

这有什么意义吗?

你需要将

目标日期包装在 strtotime() 函数中:

date('d F Y', strtotime('2013-09-14 00:00:00'));