-
Notifications
You must be signed in to change notification settings - Fork 18
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
Incorrect time retrieved + unable to set timezone #12
Comments
Forgot to mention: I also ran the sample code in this project's README (https://github.com/adafruit/Adafruit_CircuitPython_NTP/blob/master/README.rst), and it also returns epoch times that are 1 hour ahead of real time. |
Apologies, it turned out to be a false alarm. I just noticed the following in the code I posted:
🤦♂️ |
The timezone in secrets.py is used for the Adafruit IO time service in the PyPortal library (https://github.com/adafruit/Adafruit_CircuitPython_PyPortal), not this library.
I'm not exactly sure what's causing the error, but I'd like to find out. It likely wouldn't be a bug in CircuitPython - this library sends a command to the ESP32, running nina-fw, and is handled by the |
Yeah, the bug turned out to be in the code I copied. I'm not sure why running the NTP example code after I discovered the issue still returned the incorrect epoch, but since an overnight power-cycle seems to have made that problem go away, I think I'm good. |
I just installed CircuitPython v5.3.1 on my PyPortal Pynt, and updated the
lib
directory on the Pynt with the corresponding files/dirs fromadafruit-circuitpython-bundle-5.x-mpy-20201010.zip
, so everything's as up-to-date as reasonable.I then installed the following
secrets.py
:and the following simple clock
code.py
, based on https://github.com/imekon/weather-clock :The code runs correctly, but the time displayed is exactly 7 hours behind my local time, despite my double-checking the
timezone
setting insecrets.py
. Also, I confirmed that the epoch time displayed on the Pynt is exactly 1 hour (3,600 seconds) ahead of the corresponding epoch on my Linux box.Therefore, two things seem to be going wrong:
timezone
setting insecrets.py
appears to have no effect, so local time = UTCAm I doing something wrong in the code, or are these bugs in CircuitPython and/or its libraries?
The text was updated successfully, but these errors were encountered: