日期函数的奇怪行为

Ash*_*wal 4 php date strtotime

我今天在StackOverflow上遇到过这个问题,但没有得到答案.

我的问题是

echo date('Y-m-d',strtotime('2012-september-09')); // output - 2012-09-01

echo date('Y-m-d',strtotime('09-september-2012')); // output - 2012-09-09
Run Code Online (Sandbox Code Playgroud)

键盘

我很困惑,为什么第一种格式不能产生正确的答案.任何帮助?

Jvd*_*erg 6

手册:

如果分隔符是斜杠(/),则假定为美国m/d/y; 而如果分隔符是破折号( - )或点(.),则假定为欧洲dmy格式.