Struggling with time driven if commands

I want to do the following and I am really without ideas:

if current_time<= 8:00 || current_time=> 20:00 then
else …

how can I achieve this normally simple thing but I am really lost with all I found about time calculatin

Thanks

I think you are looking for:

if(now.getHourOfDay < 8 || now.getHourOfDay > 19)

Johannes

2 Likes

really?
I found only things like this:

getZonedDateTime.toInstant.toEpochMilli).plusHours(24)

Big Thanks

1 Like

this might help, there are several links that explain time

1 Like