I’m really sorry, I’m still having problems with the time not syncing. Can I just ask: should a Photon running in SYSTEM_THREAD(ENABLED); update its time from Particle’s servers without my explicitly telling it to do so in code?
I also don’t understand what happens if I call Particle.syncTime(); and I DON’T wait for it to return. Does it not happen? That might explain my woes! Thanks
Time is sync’ed only on cloud connection start-up which is generally when you power-on a device (but can be other times if you are on cellular and sleep for too long for instance).
You can call Particle.syncTime();
any time you want (I would recommend about once a day). When you call it, it kicks off a request to sync the time, and if you want to wait, you can loop on Particle.syncTimeDone
as the doc below shows.
https://docs.particle.io/reference/device-os/firmware/xenon/#particle-synctimedone-
How are you determining it is not working? Are you testing for Time.isValid() true? Have you searched on the community forum? There was a similar post a week ago?