I have timestamps stored in datetime
columns in a Mysql database.
The timestamps are already in UTC time.
My PHP application needs to return the values in ISO 8601 format.
Is it better to convert them using PHP ex:
date('c', strtotime($sqldata['my_date_field']));
Or using MySql's DATE_FORMAT
function? ex:
DATE_FORMAT(my_date_field,'%Y-%m-%dT%TZ')
I'm trying to consider speed, accuracy, and best practice.