setting date variable incremented by 25 seconds

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mccommunity
Forum Commoner
Posts: 62
Joined: Mon Oct 07, 2002 8:55 am

setting date variable incremented by 25 seconds

Post by mccommunity »

I would like to make a new date tag that is the actual current date and time but incremented by 25 seconds.


so if $date was equal to Sun, 12 May 1996 00:36:05 GMT I would want the $newdate tag to be equal to
Sun, 12 May 1996 00:36:25 GMT


$date = date ("l dS of F Y h:i:s A");
newdate = ????
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

Code: Select all

<?php
$newdate = date("l dS of F Y h:i:s A", time()+25);
?>
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Re: setting date variable incremented by 25 seconds

Post by JAM »

mccommunity wrote: so if $date was equal to Sun, 12 May 1996 00:36:05 GMT I would want the $newdate tag to be equal to
Sun, 12 May 1996 00:36:25 GMT
And for this...

Code: Select all

<?php
 $newdate = date("D d F Y h:i:s T", time()+20); 
?>
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

:lol:
Post Reply