Only run if earlier than <Time of Day> question

Anything that doesn't fit into any of the other forums
Post Reply
yomamma
Posts: 71
Joined: Wed Mar 01, 2023 4:58 pm

Only run if earlier than <Time of Day> question

#1

Post by yomamma »

Is this function's earliest time "12:00:00 AM" and the latest time "11:59:59 PM" and only good for the current day's 24 hour period??
If I said "Only run if earlier than 12:00:00 AM" would the block execute or is there time before 12 AM?

I have made the assumption that it is a hard 24 hour clock but I wanted to make sure.

Thanks for your help
User avatar
admin
Site Admin
Posts: 15282
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Only run if earlier than <Time of Day> question

#2

Post by admin »

Hi,

it is only for the current day - the code calculates a cut off time by taking the start of the day (00:00:00 in the 24 hour clock) and adding the specified time. The current time is then compared with the target time and the block runs if the current time is earlier than the target time. So, specifying 12:00:00 AM (ie 00:00:00 in 24 hour form) would mean the block never runs.

cheers,

Robin
Post Reply