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:
Please help me.
This post was flagged by the community and is temporarily hidden.
Try to set the string the same
For example: hh:mm:ss (22:30:00)
change to this block, should work, remember that the a
on the time format is for time format with AM/PM
Thanks @Chocoduba_BR my friend. It worked. Thanks a lot.
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.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.