Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

CircuitPython NTP time 1 hour ahead of UTC
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

CircuitPython NTP time 1 hour ahead of UTC

by lexfiend on Tue Oct 13, 2020 8:53 am

Hi! I filed an issue on the NTP library GitHub (https://github.com/adafruit/Adafruit_Ci ... /issues/12), but I figured I'd ask here too to see if anyone has encountered the same problem.

In a nutshell: PyPortal Pynt running CircuitPython v5.3.1, with libraries updated to Oct 10 2020, so the latest stable software all around. I ran a simple clock program that kept showing the wrong time, so I ran the NTP example code (https://github.com/adafruit/Adafruit_Ci ... ge-example) on my Pynt to debug. Strangely, the epoch time printed by the example code was exactly 3,600 seconds (1 hour) ahead of UTC!

Does anyone have any idea what's happening here? Thanks much!

lexfiend
 
Posts: 3
Joined: Tue Oct 13, 2020 8:46 am

Re: CircuitPython NTP time 1 hour ahead of UTC

by lexfiend on Tue Oct 13, 2020 9:07 am

That's weird. 24 hours later, I power up my Pynt again...and now it's getting the correct UTC time via NTP. Did something change in the interim?

lexfiend
 
Posts: 3
Joined: Tue Oct 13, 2020 8:46 am

Re: CircuitPython NTP time 1 hour ahead of UTC

by lexfiend on Tue Oct 13, 2020 9:44 am

Apologies, everyone, it turned out to be a bug in the code I'd copied from an external source, specifically:
Code: Select all | TOGGLE FULL SIZE
    ntp.set_time(60 * 60)


:facepalm:

lexfiend
 
Posts: 3
Joined: Tue Oct 13, 2020 8:46 am

Please be positive and constructive with your questions and comments.