I have a datetime field (endTime) in mysql. I use gmdate()
to populate this endTime field.
The value stored is something like 2009-09-17 04:10:48
. I want to add 30 minutes to this endtime and compare it with current time. ie. the user is allowed to do a certain task only 30 minutes within his endTime. After 30 minutes of his endTime, they should not be allowed to do a task.
How can this be done in php?
I'm using gmdate to make sure there are no zone differences.