Is there a quick way to format a \DateTime
into HTML-friendly Local date and time string (e.g. 1986-01-28T11:38:00.01
)?
Both DATE_W3C
and c
will produce a timezone, which doesn't work with datetime-local
.
I know I can do "Y-m-d\TH:i:s"
, but was curious if there's a slightly more elegant shorthand by now?