Keep receiving same epoch/time from NTP server

I have used the default Arduino example to get the time from the NTP server ( every 5 seconds for an SD card logger sketch. For some reason it worked like a charm for about 2 hours and since it keeps returning the same epoch value 2085978496, setting the UTC time to 6:28:16 constantly.

Does anybody have a clue to get this solved? Are there limitations to the use of the NTP server?

Is there also a way to use the server name instead of the IP address in my sketch? Not a lot of time servers allow hardcoding the ip address I read...


Although NIST says you only have to avoid using the service more often then every 4 seconds I think they might have blocked you for two hours at 5-second intervals. The Arduino timers aren't THAT bad so you might want to stretch your intervals to 30 or 60 seconds and use millis() between times.

Thank John, I will. Do you think they will unblock me again? Is happening since last night.

Any advice to use server names for UDP instead of ip addresses?

If the Arduino has access to a DNS server you should be able to use names. I think it works like this:

#include <Dns.h>

DNSClient dns;


IPAddress google_address;
getHostByName("", &google_address);

use another server - the internet cluster of ntp servers - might help too