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
Only run if earlier than <Time of Day> question
- 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
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
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