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.
我试过了
回声 strtotime('129:00');
但它将有一个空输出。
这个回声 strtotime('03:00');
将有 1288339200 作为输出。
我猜 strtotime() 不会接受巨大的价值?将接受 129:00 的 strtotime() 的替代方案是什么。
另一种方法是给出strtotime()一个真正有意义的时间。我自己知道没有时钟可以到 129 点。
strtotime()
这并不是说没有,但我已经很老了,我已经旅行了一点。我敢肯定我会注意到这样的事情:-)
请参阅文档,其中指出:
该函数期望得到一个包含美国英语日期格式的字符串
并最终将您指向此处以获取有效的时间格式。
strtotime将日期或时间(一天,24 小时制)解析为 UNIX 时间戳。129:00既不是日期也不是时间,所以它返回false. 它不是“太大”,它只是无效的输入。
strtotime
129:00
false