I try to run a specific batch of code only at certain hours of the day. I want to run this code only after 8:00 and until 22:00.
This code is included in the footer of my site, but it does not seem to work, it still runs the code after this hours. (my server is in the same time zone as me):
if(date("Hi") < 2200 && date("Hi") > 0800){
How can I run code only between specific times?
source share