I need to add 15 minutes to the current time.
For eg : now is
$current_date_time = date('d/m/Y H:i:s');
$current_date = date("d/m/Y H:i", strtotime($current_date_time."+15 minutes"));
Here's a simple example
//what time is it? $t=time(); //how long is our interval? $interval=15*60; //we can calculate when the last interval started by subtracting $t % $interval $last = $t - $t % $interval; //so now we know when the next interval will start... $next = $last + $interval; echo "Next interval at ".strftime('%H:%M:%S', $next)."\n";
You look like you might want to add 2*$interval to the last interval, but you should be able to adapt this to suit you.