20170803173418 Я хочу отнять 4 минуты и 13 секунд и получить новую метку даты, которая будет быть 20170803173005
Какой код мне использовать, чтобы получить это?
РЕДАКТИРОВАТЬ < /p>
На данный момент у меня есть:
Код: Выделить всё
$dbTime = $row['aptDeadline']; // This is the appointment end time stored in DB
$dbTime = new DateTime($dbTime);
$currentTime = date("YmdHis"); // This is the current time
$currentTime = new DateTime($currentTime);
$counterTime = $row['aptDeadline']; //This is the time a countdown clock works from inDB
$counterTime = new DateTime($counterTime);
$difference = $currentTime->diff(new DateTime($dbTime)); // Calculate the time between now and the apt time in the db
Подробнее здесь: https://stackoverflow.com/questions/454 ... delimiters