Something wrong with date time computation when quiz is limited to once a day

2 years 5 months ago #7 by John Bongiovanni
Sounds great, thanks. Since you use server time to set the datetime_taken, then using server time to check for cooldown time makes sense.

Please Log in or Create an account to join the conversation.

2 years 5 months ago #8 by Christopher Mavros
Thank you John.
Let me know if you need any further assistance.

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

2 years 5 months ago #9 by John Bongiovanni
This almost does it, with one little twist. Since the server time (which I can't change) is UTC, it does the day computation for UTC, not local time. I can live with this, and just explain when asked that it might be two days instead of one to wait to retake.
I do expect that this would be a common problem for sites using a shared server from a hosting service with a server time that's not local time.

Please Log in or Create an account to join the conversation.

2 years 5 months ago #10 by Christopher Mavros
Yes, that's reasonable.

I'm just checking. You have changed the Server timezone in Joomla's Global Configuration settings, haven't you?

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

2 years 5 months ago #11 by John Bongiovanni
Yes, the Website Time Zone in Global Configuration->Server is Los Angeles

Please Log in or Create an account to join the conversation.

2 years 5 months ago #12 by Christopher Mavros
It seems that the server ignores the timezone setting.
One last attempt could be to set the timezone in .htaccess:
php_value date.timezone "America/Los_Angeles"

I can't think of anything else we could do in this case.

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

Moderators: Christopher Mavros