Open quiz based on scheduled date and time in laravel
Hi,
I have a quiz listing with scheduled date and time like below,
Quiz 1 will open on 28-11-2020 11:00:00
Quiz 2 will open on 29-11-2020 15:00:00
So once scheduled date crosses users will be able to open the quiz at any time.
But the main problem is i have default time zone (date_default_timezone_set("Asia/Kolkata")) in construct function because most of the users are from India.
But if users from other countries tries to access this quiz does he get early or late access , if i set default timezone to INDIA?
your best bet is to use UTC as your default timezone...
Wiki
Weather forecasts and maps all use UTC to avoid confusion about time zones and daylight saving time. ... This ensures that all pilots, regardless of location, are using the same 24-hour clock..
Or if you want you could get each visitors' localtime and adjust it accordingly.
@bezhansalleh so consider i have a test link scheduled date like below,
2020-11-30 this means test will open exactly 12AM. consider now current date and time in india is 2020-11-30 12 AM then indian users can able to access this test link. Now if user is in different country with current date time 2020-11-29 8 PM and he will get access to schedule test link because in india it crosses 12AM. even though if he tries to access the test at this time he falls in the same category of indian users so i don't think there is problem with this right? so every user will take test at same time but in their regions. this is how it will happen right?