-->
Page 1 of 2

TIME()

PostPosted: Fri Sep 23, 2016 2:55 pm
by lew247
Could someone please explain where the command TIME() actually gets the time from?
I live in the UK and when I do it, it comes back with the correct local time which at the moment is 1 hour ahead of GMT/UMT
What I need to know is, will it always have the correct local time no matter where in the world you are?
Will it automatically update depending if BST/DST/EST or any of the other time adjustments happen?
If it possible to know where exactly the ESP gets the time information from? I presume it's one of the NIST servers or something similar, is it possible to change the server?

Re: TIME()

PostPosted: Fri Sep 23, 2016 5:52 pm
by Mmiscool
Yes. by default it uses nist time servers.

You can specify your own server and offset from gmt. Also daylight savings if applicable.

The setup code for the time function is linked to below.
https://docs.google.com/document/d/1EiY ... z2o5d3z1tp

Re: TIME()

PostPosted: Mon Nov 14, 2016 8:38 am
by Gennadiy
Please tell me more about the operator
Time.setup()
How does he work

My module is connected to the Internet

command
Print time()
shows
Thu Jan 01 00:00:00 1970

I use
time.setup("+3", "0", "time-a.nist.gov")
or
time.setup("+3", "0", "129.6.15.28")
Print time()
shows
Thu Jan 01 00:00:00 1970

How to obtain reliable data on the time?

Give an example code please.

Thank you.

Re: TIME()

PostPosted: Wed Nov 16, 2016 8:00 pm
by Mmiscool
To use the time.setup() function you have to have a delay afterwards so that it can sync.