谁能说随着时间的推移,这里使用的是日期格式?
<Date>2016-01-29T09:29:29.5033083+03:00</Date>
我试图在 php$time = microtime();
list($usec, $sec) = explode(" ", $time);
$datetime = new DateTime();
$datetime->setTimestamp($time);
$usec = $usec * 1000000;
echo date('Y-m-d\TH:i:s.'.$usec.'P') . "<hr>";
结果:
2016-05-19T12:52:04.415507+05:00
但是字符数不一样:
.5033083
.415507
如何将这种格式转换为 php?
<Date>2016-01-29T09:29:29.5033083+03:00</Date>