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.
我遇到过这种日期格式:
2013-03-12T09:16:12.1550656+01:00
根据我在网上找到的内容,这是 ISO 8601(我正确吗?)。
如何使用 php 转换这种日期格式?
我可以使用 date('c') 轻松生成它,但我需要转换这种类型的日期:
20130422122037 - (YYYYMMDDHHMMSS)
尝试这个:
$date = new DateTime('20130422122037'); var_dump($date->format('c'));