On Wed, 13 Dec 2006, Tris wrote:

> How can I add 15 mins to a date function?


OK, date('U') will get you the current date + time as a Unix ctime
(seconds since midnight, Jan 1, 1970).  Using a ctime is nice as it's a
number that you can just add/subtract from rather easily :)

So, if you take what date('U') gives you, add 15 mins, then format that
however you feel like, you'll have what you want.

So, something like:

$expire = date('d/m/Y H:i:s', date('U') + (60 * 15));

Ought to do the job.  (The 60 * 15 is obviously 15 minutes... we're
dealing with a ctime which is seconds, so 60 seconds times the desired
number of minutes).

Cheers

Dave P




____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
       Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to