Page 1 of 1

test new day

Posted: Saturday 01 February 2025 15:09
by pierrotori
Hi,
it is a best solution to get the new day and test if dz.time.hour == 0 in the dzvents script ?
Regards

Re: test new day

Posted: Saturday 31 May 2025 22:04
by pierrotori
i found this solution with data persistent

Code: Select all

 
 local jour	= dz.time.day
if jour ~= dz.data.config.jour then
end

Re: test new day

Posted: Saturday 31 May 2025 22:48
by HvdW
What about this?

Code: Select all

if os.date("%H:%M") == '23:59' then
or

Code: Select all

on = {
        timer = {
            'at midnight',
                   },
       }