I was gleefully using SparkTime in my project when it suddenly stopped working. The UDP connection was failing. I noticed that the SparkTime.begin() function takes a string as a server name. However, the docs imply that UDP.beginPacket() takes a 4-byte IP address for the remote connection. Did something change? The SparkTime source is passing in the string:
_UDPClient->beginPacket(_serverName, 123); //NTP requests are to port 123
So I changed this to:
_UDPClient->beginPacket(IPAddress(204,235,61,9), 123); //NTP requests are to port 123
…and pow - it starts to work.