-->
Page 1 of 2

time (via sntp calls or via time()) not right ?

PostPosted: Thu Oct 19, 2017 11:43 am
by dannybackx
I wrote an app in two versions. It's supposed to switch a light on and off to spoof burglars.

The one version is with time() and configTime(), the other uses the sntp_ calls.

Both seem to forget about the timezone after a while. At first the clock is right, a couple of hours later the device seems to think it's in London.

Any clues ?

Re: time (via sntp calls or via time()) not right ?

PostPosted: Thu Oct 19, 2017 4:52 pm
by dannybackx

Re: time (via sntp calls or via time()) not right ?

PostPosted: Thu Oct 19, 2017 5:35 pm
by dannybackx
Apologies, I just copied the output of "svn info", apparently that's not right.
This one should work :

https://github.com/dannybackx/serre/blo ... switch.ino

Re: time (via sntp calls or via time()) not right ?

PostPosted: Thu Oct 19, 2017 7:39 pm
by mrburnette
dannybackx wrote:I wrote an app in two versions. It's supposed to switch a light on and off to spoof burglars.

The one version is with time() and configTime(), the other uses the sntp_ calls.

Both seem to forget about the timezone after a while. At first the clock is right, a couple of hours later the device seems to think it's in London.

Any clues ?


I do it this-a-way

https://www.hackster.io/rayburne/nist-date-amp-time-with-esp8266-and-oled-display-e8b9a9

Ray