I am trying to add +5 minutes to a date as follows, but it doesn't add them
$now = date("Y-m-d H:i:s");
$expDate = date($now, (strtotime ("+5 Minute")));
On the other hand, if I bring the date directly from the server, it works
$now = date("Y-m-d H:i:s");
$expDate = date('Y-m-d H:i:s', (strtotime ("+5 Minute")));
You can do the following:
DateTime()
modify
which accepts a string indicating the incrementCode:
Departures:
REFERENCES
Try to do the following:
If what you want is to work on a specific time you have to modify the variable
$now
as follows: