OK, I've started making a simple alarm program and I've run into a fairly major problem - I'm saving all my alarms OK and successfully recalling them as TDateTimes, but there's a difficulty. Are you sitting comfortably?
Say I have alarms at 08:30, 11:15 and 16:30. This is fine if the app starts before the earliest alarm - it can progress through the sequence easily enough. But since the app runs on a network, it is getting started and stopped all the time, so if a user logs on and the app runs at 10:13, it needs to reorganize the order in which the alarms come.
Bear in mind that this has to be flexible: a user might stay logged on for over 24 hours...
I've tried doing stuff like Now-AlarmOne but mathematical operators seem to go haywire with this!