📜  php 将小时数添加到当前日期 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:26.826000             🧑  作者: Mango

代码示例2
$minutes_to_add = 5;

$time = new DateTime('2011-11-17 05:05');
$time->add(new DateInterval('PT' . $minutes_to_add . 'M'));

$stamp = $time->format('Y-m-d H:i');