i am devloping a quiz site and there is time for x min to answer the quiz. So when user clicks on start quiz link the starttime(current time at this instant )is recored in session .Also the endtime (start_time+ 30 min ) is recored in session and every time he submits a answer the current time is compared with the quiz end time. Only if the current time is less then end_time the answer shold be accepted.
- So how can i get the currentdatetime?
- How can i add x minutes tocurrent this datetime?
- How can i comapare (<=) datetime ?
I think we should use date time. Is it right?