Okay, ignore the first question about TimeAPI.org, that was meant for another post and got accidentally pasted in.
So essentially, you just want a notification X minutes before Y time?
What if I had a function called netTime.setAlarm(0, “2014-01-03T10:02:00+0100”, -15) [Argument #1: Alarm Number, #2: Alarm Time, #3: Offset to Trigger On]; there would be a netTime.getAlarm(0) [#1: Alarm Number to Check] that would return a true or false boolean value depending on if the alarm had triggered. Would that suffice?
See, right now there’s no built-in timekeeping functions on the Core. There is a RTC onboard, but the Spark Team doesn’t have it quite implemented yet, though it is on their list! Anyway, since there’s no onboard timekeeping right now, you’d need to check the internet for the current time on every pass of void loop(), which would create a ton of traffic and make things quite slow.
So, I could implement the above alarm functions by pulling time from the internet then using a “Soft RTC” to countdown in the background (I’d recheck the internet time every 10 minutes or so to manage the drift).
I should have my library done by the end of the weekend, but once I get the basics going I can work on the alarm functions and let you start testing things.