标签云

微信群

扫码加入我们

WeChat QR Code

I have the following date from influxdb: 2015-07-23T20:15:12.630199712ZI am trying to format it to just show the hours, minutes and seconds.$date = \DateTime::createFromFormat("Y-m-d\TH:i:s.u\Z", '2015-07-23T20:15:12.630199712Z');if($date=== false) {die('yes');}Logically that should work... but it returns false. I have tried about ten other different combinations but alas, none of them worked. Any ideas? Thanks.


Your microseconds are 3 digits too long

2019年04月20日20分38秒

Ah yes, I didn't notice that. Thanks!

2019年04月20日20分38秒

You're welcome.

2019年04月19日20分38秒

As Rizier123 pointed out, all timestamps from InfluxDB are in nanoseconds.

2019年04月20日20分38秒