Reputation: 1641
Does anyone know why the seconds field would be about 30,000 different between a MAC and ESP32 (Arduino) synced to the same NTP server?
I have a group of ESP32 chips with NTP clients running, and they all sync from a local Windows10 NTP server, and do so correctly. The ESP32 chips all agree, but the Mac does not.
I have an OSX Mojave machine also set to use that Windows10 NTP server as it's time serer, and have requeted updates with 'sntp -sS' successfully.
My problem is that the 'gettimeofday' values are wildly different, by about 30,000 seconds, between the ESP32 and Mac platforms.
Timezone doesn't seem to matter. I am getting this value via time.time() in Python which is supposed to call 'gettimeofday' for me.
Upvotes: 0
Views: 63
Reputation: 1641
It turns out the "standard" NTP impl on the ESP32 adds a fudge factor, combined with timezone shift, that accounted for it. I modified the library not to add those, and it's working as expected.
Upvotes: 2