<?php
$dbDate = '2017-11-27 20:00:00';
$dbDate = new DateTime($dbDate);
$aDate = new DateTime
(date('Y-m-d H:i:s')); $timePassed = $dbDate->diff($aDate);
$minutes = $timePassed->days * 24 * 60;
$minutes += $timePassed->h * 60;
$minutes += $timePassed->i;
echo $minutes;
PD9waHAKJGRiRGF0ZSA9ICcyMDE3LTExLTI3IDIwOjAwOjAwJzsKJGRiRGF0ZSA9IG5ldyBEYXRlVGltZSgkZGJEYXRlKTsKJGFEYXRlID0gbmV3IERhdGVUaW1lKGRhdGUoJ1ktbS1kIEg6aTpzJykpOwokdGltZVBhc3NlZCA9ICRkYkRhdGUtPmRpZmYoJGFEYXRlKTsKJG1pbnV0ZXMgID0gJHRpbWVQYXNzZWQtPmRheXMgKiAyNCAqIDYwOwokbWludXRlcyArPSAkdGltZVBhc3NlZC0+aCAqIDYwOwokbWludXRlcyArPSAkdGltZVBhc3NlZC0+aTsKZWNobyAkbWludXRlczs=