Format date in MySQL SELECT as ISO 8601
This worked for me
DATE_FORMAT( CONVERT_TZ(`timestamp`, @@session.time_zone, '+00:00') ,'%Y-%m-%dT%TZ')
The DATE_FORMAT(DateColumn)
has to be in the SELECT
list:
SELECT DATE_FORMAT(date, '%Y-%m-%dT%TZ') AS date_formatted
FROM table_name
ORDER BY id DESC