php - how to convert minutes into microtime -


i have session contains microtime(true) value. below:

yii::app()->user->setstate('portal_logged_time', microtime(true)); 

now want add 15 minutes in above session, should remain in microtime.

$starttime = yii::app()->user->getstate('portal_logged_time'); // want add microtime of 15 minutes $starttime $endtime = // want ($starttime*15*60);  

i have tried not working $starttime*15*60.

so how achieve that?

after trying fetch remaining minutes , seconds:

$duration = $endtime-$starttime;  $hours = (int)($duration/60/60); $minutes = (int)($duration/60)-$hours*60; $seconds = (int)$duration-$hours*60*60-$minutes*60; 

values provided microtime() in seconds. should do:

$endtime = $starttime + 15*60; 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -