Jump to content

Have 30 minutes passed since a specifc time and date?


eyalrosen123rulezz

Recommended Posts

Convert the time/date into a unix timestamp using mktime(), then use this code:

 

if(time() > (earlierTime + (60*30)))
{
    echo "More than 30 minutes has passed";
}
else
{
    echo "thirty minutes hasn't yet passed";
}

 

Where 'earlierTime' is the time you created using mktime().

 

note: time() will give you the unix timestamp for the current time.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.