How to convert timestamp to "this date"?

I have timestamp, and I need it to be translated by PHP into following string: 2008-07-17T09:24:17Z. It’s for plugin. I know the y-m-d. But there’s also T and Z for no reason. The question being, how could I translate timestamp into date same as above?

$timestamp = 1485620679;
// magic
echo $date;
$date = gmdate('Y-m-d\TH:i:s\Z', $timestamp);

"The T is just a literal to separate the date from the time, and the Z means “zero hour offset” also known as “Zulu time” (UTC). " :


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.