Welcome Guest, Not a member yet? Register   Sign In
A Question About Time


In my application i have students and teachers. Students book lessons from teachers' calendars. I want to prevent students from choosing dates and times before current date and time. Normally, i could check if selected time is before or after CURRENT_TIMESTAMP but in this specific situation both students and teachers have their own time zones selected. So as a student who wants to break the system, i can change my time zone setting to something to make system think my local time is earlier then what it actually is.

Any suggestions?

Thank you.

Are you using the time on the client? Or are you using the time on the server? If everything you do, uses the server's time, then it seems like it would be harder to manipulate.

Sorry, I misunderstood what you were saying. I see now.

It seems as though the best thing would be to only base calculations on a universal timestamp that no user can change.

Thanks for reply.

Sadly, I have no clue how to implement that. Though, I think that you said is the proper way to do it.

Perhaps, I can rely on both student and teacher's time zone settings rather than rely on only one of them. It leaves a small security gap though... The Student and the teacher could work together to abuse the system. I'm confused. :\

Theme © iAndrew 2016 - Forum software by © MyBB