06.04.2021, 05:40
You can convert current time to a number of minutes passed since 0:00 and use it in your calculations. Use this example to check if current time is between 5:30 and 10:00
Code:
function tominutes(h, m)
return h * 60 + m
end
now = os.date('*t')
mins = tominutes(now.hour, now.min)
if mins >= tominutes(5, 30) and mins <= tominutes(10, 0) then
-- do something here
end