hii how can i convert this yyyy-MM-dd
HH:mm:ss.SSS

to 2021-05-18T22:48:07.252-04:00
in php

$date = (new DateTime())->format('Y-m-d\\TH:i:s.vP');
echo $date;

Outputs:

2022-11-17T08:07:33.043-05:00
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.