This question already has an answer here:
- Adding minutes to date time in PHP 13 answers
The date and time format I have is:
Example 1:
$dateTime = 2016-09-08 21:00; //(year-month-day hour:minute)
$interval = 04:00; //(hour:minute)
$outputShouldBe = 2016-09-09 01:00;
Example 2:
$dateTime = 2016-09-08 21:00; //(year-month-day hour:minute)
$interval = 01:40; //(hour:minute)
$outputShouldBe = 2016-09-08 22:40;
</div>