-
Notifications
You must be signed in to change notification settings - Fork 18
OverflowError: timestamp out of range for platform time_t #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have reproduced this error , but if I execute the ntp_simpletest.py code manually, line by line, at the REPL, it works ... for some reason -- when the script is executed, the esp.get_time() call in ntp.set_time() is returning (0,) |
hmm I added a loop to wait for esp.get_time() to return a non-zero result -- it works after 15 seconds
also ran on metro_m4_airlift -- one time it worked after 1 retry -- the next took 16 seconds
|
this is not a problem with NTP but with ESP32SPI - opened issue there |
I submitted a PR to have ESP32SPI raise an exception if the returned time is zero. The adafruit_ntp.py library could be modiied to handle the exception or the ntp_simpletest.py can handle it - here is an example
I ran this with the updated esp32SPI on a metro_m4_airlift_lite
Let me know how you think we should proceed. Do you want a PR to just update the ntp_simpletest.py or do you want to handle the exception in the library? If so, do you want to limit the number of retries? It typically takes 15 seconds for the time to become valid. |
Hey sorry, I am just seeing this. Everything looks great. I'm impressed! |
@jerryneedell I was playing around with this this AM and will submit a PR. I added an |
Patched in |
Running the example on Adafruit Metro M4 Express AirLift (WiFi) creates this error. Running latest library as well.
OverflowError: timestamp out of range for platform time_t
The text was updated successfully, but these errors were encountered: