I want to get the timestamp in 15 minutes from now.
I don't want to use strtotime, I want to use DateTime and DateInterval.
I'm doing:
$now = new DateTime('now');
$in_15_m = $now->add(new DateInterval('PT15M'));
echo 'Now:' . $now->format('Y-m-d\TH:i:s\Z');
echo 'In 15 min': . $in_15_m->format('Y-m-d\TH:i:s\Z');
But both printed lines contain the same date.
How can I achieve this?
The arguments for DateInterval aren't really clear in the docs, though I think I am using it the correct way.
Thanks.