-->
Page 1 of 3

A way to force manual synchronization @ TimeLib?

PostPosted: Fri Nov 11, 2016 12:37 am
by mikekgr
Dear Sirs,
I need your help. I am trying to code for a NTP based project, with automatic timezone calculation update / correction etc using time library.
For this reason I looking for a way to do something like an "on demand sync" in order to achieve the same result as ex doing setSyncInterval(120) command, but without to have to wait for the next timed sync ( let say something like Sync(now).
What do you suggest, is there any way to do this? Is this library has a method to triggering this kind of sync?

Thanks and Best Regards,
Mike Kranidis

Re: A way to force manual synchronization @ TimeLib?

PostPosted: Fri Nov 11, 2016 2:48 pm
by mikekgr
No one of the experts looking here can offer me a solution?
Please!

Thanks

Re: A way to force manual synchronization @ TimeLib?

PostPosted: Fri Nov 11, 2016 3:06 pm
by martinayotte
Since the Time library is using an external SyncProvider anyway, why not simply calling setTime() function with the time received in your NTP call ?

Re: A way to force manual synchronization @ TimeLib?

PostPosted: Fri Nov 11, 2016 3:25 pm
by mikekgr
martinayotte wrote:Since the Time library is using an external SyncProvider anyway, why not simply calling setTime() function with the time received in your NTP call ?


Dear Martin,
First of all I feel very happy to chatting with you.

Let me explain what I trying to do: I have in my ESP8266 NTP client running. I need to build a mechanism for correct timezone setting taking into account the DST changes (in Greece twice per year). When ESP8266 is booted I need the soonest to update the NTP time (that is no problem, OK here) and then to apply (again as soon as possible) timezone + DST.
With the above in mind and let's say that now the DST is UTC (Always NTP time) +2 hours what it is supposed to do and how?

Thanks and Best Regards
Mike Kranidis