如何在日期时间字符串中以分钟为单位添加时间?

How to add time in minutes in datetime string?

我在 Codeigniter 项目中工作,我想在日期时间字符串中添加以分钟为单位的时间。 我有一个日期时间字符串,

2020-09-25 12:20:00

我想加时间

10 minutes
$newtimestamp = strtotime('2020-09-25 12:20:00 + 10 minute');
echo date('Y-m-d H:i:s', $newtimestamp);

输出:-

2020-09-2512:30:00