Column date
is timestamp
- default - current_timestamp
example value: 2017-04-07 09:45:53
$stmt = $db->query("select * from cinema order by date desc");
while($row = $stmt->fetch()){
$date = strtotime($row['date']);
$datea = date("d-m-y", $date);
$time = date("H:i", $date);
I'm getting -2 hours difference comparing to my timezone - 09:45
instead of 11:45
- so I tried:
$stmt = $db->query("SELECT *, CONVERT_TZ(date, '+00:00', '+01:00') FROM cinema order by date desc"); - without success
I also tried to change column type from timestamp (current_timestamp)
to datetime (current_timestamp)
.
And still getting -2 hours difference.
Any help?