获取rfc3339标准格式的日期时间字符串

<?php
$time = strtotime('2015-5-20 13:29:35');
echo date(DATE_RFC3339, $time); // 2015-05-20T13:29:35+08:00
// 说明:内置常量DATE_RFC3339的值为字符串"Y-m-d\TH:i:sP"

Copyright © 2023 码农人生. All Rights Reserved