In my database I have a datetime field with the following value 2014-07-21 00:00:00.
When I pull the data I have the line:
SELECT UNIX_TIMESTAMP(date) AS `date` ...
When I then use PHP date to format it for human reading the following happens:
echo date('d/m/Y H:i:s', $row['date']);
// outputs 20/07/2014 23:00:00
I don't understand what's doing this.
SELECT DATE_FORMAT(date, '%d/%m/%Y %H:%i:%s')instead?