prabha
01-09-2008, 09:48 AM
hi,
i'am new one to php.i have one doubt in time functions.my requirement is, i have to add 10mins with the current time.i dont have idea about this.can anyone help me.
the strtotime function is quite intelligent in parsing relative times:
echo strtotime('+10 minutes'); //will give the timestamp
echo date('Y-m-d H:i:s',strtotime('+10 minutes')); //will give a more readable format
prabha
01-09-2008, 01:07 PM
hi,
i tried your code,it works :-)
but your code display the current time in Unix timestamp format.how i convert that unix timestamp into my local time?
Inigoesdr
01-09-2008, 02:17 PM
The second line of the posted code above shows you.
aedrin
01-09-2008, 03:19 PM
Wouldn't this be much more consistent/obvious/efficient?
$timePlusTenMinutes = time() + 60 * 10;
echo date('r', $timePlusTenMinutes);
prabha
01-10-2008, 06:20 AM
hi aedrin,
i tried ur code.its really good.thanks:-)
prabha
01-10-2008, 06:51 AM
hi,
i have one doubt.is it possible to display the clock in my site using php not javascript?if possible,then tell me the solution.
prabha
01-10-2008, 07:30 AM
how to convert GMT(Greenwich Mean Time) to IST(Indian Standard Time) format?