ISO 8601
//Object Oriented Method
$datetime = new DateTime('2010-12-30 23:21:46');
echo $datetime->format(DateTime::ATOM); // Updated ISO8601
//Procedural Method
echo date(DATE_ISO8601, strtotime('2010-12-30 23:21:46'));
0
0
YYYY-MM-DD'T'hh:mm:ss'Z'
Z is the ofset from the UTC timezone
it can be replaced with "(+/-)hh:mm"
if ofset is not specified, character 'Z' is in place instead
2021-01-01T01:01:01+01:00
2021-02-02T02:02:42.069-02:00
2021-03-03T03:03:03.3Z
20210404T040404Z
Thank you!
0
0
4.33
3
2021-01-05T11:48Z
Thank you!
3
0
Are there any code examples left?
New code examples in category Other