Hello, hope you all are doing well.
I generally don’t ask question before trying multiple times and searching it in forum.
But this time i got stuck and i was unable to find solution.
My question is I am creating online shopping app all work is completed but i m trying again and again “how to make app available to accept orders only specific time?”
i.e If shop time is from 07:30 AM to 10:30 PM, then only in between this duration users can place orders. Otherwise users should get the shop closed message.
Here is what I tried:
I see you have your solution but just want to point out the problem with using clock.now instance to verify time before allowing a feature or use-case is that when user changes the time on their device, they can deceive your app and still place order in the app.
I would recommend using DateTools extension to use UTC time so no one can finesse around the security even while using VPN and changing their time zone.