So… this thread took a few different directions. If you would like to discuss something not specifically related to the inference of target start and end times, please start a new topic.
With respect to the the original issue, I chose simplicity. It does not address all problems, but it also does not add any new settings and should work for just about everybody (except @mads0100… it still does not support starting of a sequence at 06:00 with a start time at 19:00, SGPro still thinks that is yesterday and will start the target).
The current scheme / rule set is as follows:
- Sequences now have a “sequence day”… a period of 24 hours in which the sequence will run (mostly).
- The boundary for this is now from 0900 to 0900. I tried the “latest” time, but that was fraught with pitfalls and special cases. This should be fine in all but extreme latitudes (might add a way to override the inferred time later).
So… the use cases:
@jmacon brought this up with a target that ended at 22:00 (or whatever), starting at 22:15 started the target because the end time was inferred to be the next 22:00 and not the one that just passed. Now the “sequence day”, when the sequence is started at 22:15 will be from 0900 that day to 0900 the next and the target will be skipped because it is in the past (expected behavior). Conversely, starting at 21:45 would place the 22:00 end time in the future. Starting the sequence at this time will produce the same “sequence day”.
@Andy had an issue (after changes to fix the above issue) where the sequence was started at 16:45 and had a target with an end time at 05:00. The behavior was that SGPro inferred that this end time was yesterday and would skip the target. Now starting at 16:45 produces a similar 0900 (of the same day) to 0900 the next day “sequence day”. This means the end time is now properly placed at 0500 in the future and the target will run until that time.
In addition to this, I have placed some extra info in the target setting dialog to help users understand what they are inferring when they input certain dates. No user entry required… it is just info:
Please feel free to throw other use cases at this to see where this method stands in terms of general usability…