Well I'm having a bit of trouble again, and this time it doesn't include detailed info on MyBB xD
Within a database, I've got a row that has time in it. Time that derived from:
$time = date("gis");
The time in the Database doesn't change. What I need is for a way to detect if the CURRENT time exceeds the time in the database by a specific number. I just can't find a way using if statements.. Unless I'm just brain-dead atm or something.
Just remember, the format would be:
g - Hours (1-12)
i - Minutes (1-66)
s - Seconds (0-66)
But that's automatic with date("gis");.
And just as an example:
Database holds the time: 22000 (or 2:20:00 - 2 hours, 20 minutes, 0 seconds)
Current time is: 22700 (or 2:27:02 - 2 hours, 27 minutes, 0 seconds)
TIME THAT MUST ELAPSE: 10 minutes
This example will 'fail' because it has not been 10 minutes, it's only been 7 minutes and will not run a script because it hasn't been 10 minutes yet.
Database holds the time: 22000 (or 2:20:00 - 2 hours, 20 minutes, 0 seconds)
Current time is: 24800 (or 2:27:02 - 2 hours, 48 minutes, 0 seconds)
TIME THAT MUST ELAPSE: 10 minutes
This example is successful because it's been 28 minutes, which is more then 10 minutes and will run a specified script because of it being more then 10 minutes.
So.. can anybody help? I don't need to know a script that is a result of the time exceeding, I just need to know a way of detecting if the time is exceeded.
Within a database, I've got a row that has time in it. Time that derived from:
$time = date("gis");
The time in the Database doesn't change. What I need is for a way to detect if the CURRENT time exceeds the time in the database by a specific number. I just can't find a way using if statements.. Unless I'm just brain-dead atm or something.
Just remember, the format would be:
g - Hours (1-12)
i - Minutes (1-66)
s - Seconds (0-66)
But that's automatic with date("gis");.
And just as an example:
Database holds the time: 22000 (or 2:20:00 - 2 hours, 20 minutes, 0 seconds)
Current time is: 22700 (or 2:27:02 - 2 hours, 27 minutes, 0 seconds)
TIME THAT MUST ELAPSE: 10 minutes
This example will 'fail' because it has not been 10 minutes, it's only been 7 minutes and will not run a script because it hasn't been 10 minutes yet.
Database holds the time: 22000 (or 2:20:00 - 2 hours, 20 minutes, 0 seconds)
Current time is: 24800 (or 2:27:02 - 2 hours, 48 minutes, 0 seconds)
TIME THAT MUST ELAPSE: 10 minutes
This example is successful because it's been 28 minutes, which is more then 10 minutes and will run a specified script because of it being more then 10 minutes.
So.. can anybody help? I don't need to know a script that is a result of the time exceeding, I just need to know a way of detecting if the time is exceeded.
