I have confirmed what Phil found.
My test:
load this bit of code onto a nodeMCU module.
Code: Select allmemclear
time.setup(-7,0)
delay 3000
'
[Main]
bla = time()
serialprintln bla
delay 2000
[Wait]
btn = io(pi,d3)
if btn = 0 then
goto [Main]
else
goto [Wait]
endif
note: this code uses the FLASH button on the nodemcu module to cause the esp to serial print the time.
Watch your serial monitor program to make sure that the module has gotten the correct time from NTP.
Each time you press the FLASH button it will print the time.
Go turn off your internet (I just unplugged my DSL router, which also provides my local wifi)
Each time you press the FLASH button the module still prints the correct time and you can clearly see the seconds updating and, if you wait long enough, also the min, hours, etc.
So again the question for me is what causes the module to actually go to NTP for time??
Does it try and if the internet is unavailable then it continues on with the previous time?
What system vars are keeping track of the time values??
help us mister wizard!!
dwight