Hi
I got the current time as follows

$time=date("h:i:s")

i got the result as

02:38:05

i want to add 10 mins with this time how can i add that,help me out


Regards,
Vidhya

The following will do the job and I have even debugged a php timezone problem in this script.

if (ini_get('date.timezone')=='') {
    ini_set('date.timezone','Europe/London');
    }
date_default_timezone_set(ini_get('date.timezone'));

echo 'Current time: '.date('h:i:s').'<br>'; //current time
echo 'In 10 Minutes:'.date('h:i:s',strtotime('+10 minutes')); //future time

mark the thread as solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.