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.
将给定的欧洲格式日期 (DD/MM/YY) 转换为正确时间戳的最有效方法是什么?
示例:10/11/12 应输出 1352505600 作为 2012 年 11 月 10 日,而不是 2012 年 10 月 11 日
DateTime::createFromFormat()
$date = DateTime::createFromFormat('d/m/y', $eu_date); echo $date->format("U");
Use the 2nd optional variable to the date function to feed it the unix timestamp
http://php.net/manual/en/function.date.php