@bko So i got my code working. thanks so much for your help.
One thing i wanted to point out is that i was still using your SparkTime library to grab the time.
I was having issues getting my webhook to work with my spark.variable and it was driving me nuts.
I gutted my code so it was just a spark.variable and a webhook. the webhook callback method sets the variable and as soon as i ripped out all the other code it started to work as expected. i started adding the rest of my code back in, method by method and as soon as i added this little gem:
currentTime = rtc.now();
hour = rtc.hour(currentTime);
min = rtc.minute(currentTime);
it broke again. all i saw when i monitored the variable was empty strings. if i
subscribe mine i see the webhooks returning my xml but the variable is blank. if i comment out the rtc code, the spark.variable works fine.
a little google search brought me to this: > https://community.spark.io/t/sparktime-vs-time-library/9810
and i removed the sparkTime library, updated my code to Time.Hour(), etc and now all is working.
I had to add the Time.Zone(-4) to get the time correct and now will have to manage time changes due to DST but at least it is working.
I just wanted to let you know because i know you wrote that library and because others may experience the same issue.
May be worth looking into why exactly this happened as other libraries may have similar issues.
let me know if want my complete code so you can look into to it more.