-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
os file system time not synchronized #9921
Comments
Hi, I see the same behavior on both an S2 and C3 QT PY. It seems that the file time does not follow But file times are correct for me when not setting the time source and instead use: rtc.RTC().datetime = ntp.datetime Which might mean that you need to manually call that from time to time to keep it in sync. I see no difference between the QT PY C3 and the QT PY S2 with the same code (in both your code, and my modified version the boards behave identical to each other). Maybe you set the RTC on the C3 in a previous test or some other code ? First run after changing the code as mentioned above:
Second run (time kept after soft reload)
|
Thank you and sorry for returning so late!
Regarding C3: mind that I talk about the XIAO ESP32-C3 module, not adafruits QT module. They XIAOs C3 and adafruits C3 behave different. But with this solution, I can make them behave the same. Thanks again! |
CircuitPython version
Code/REPL
Behavior
file date is not synchronized with the system time.
code.py output:
struct_time(tm_year=2000, tm_mon=1, tm_mday=1, tm_hour=1, tm_min=0, tm_sec=14, tm_wday=5, tm_yday=1, tm_isdst=-1)
struct_time(tm_year=2024, tm_mon=12, tm_mday=28, tm_hour=21, tm_min=56, tm_sec=10, tm_wday=5, tm_yday=363, tm_isdst=-1)
struct_time(tm_year=2024, tm_mon=12, tm_mday=28, tm_hour=21, tm_min=56, tm_sec=10, tm_wday=5, tm_yday=363, tm_isdst=-1)
struct_time(tm_year=2024, tm_mon=12, tm_mday=28, tm_hour=21, tm_min=56, tm_sec=15, tm_wday=5, tm_yday=363, tm_isdst=-1)
file_date: struct_time(tm_year=2000, tm_mon=1, tm_mday=1, tm_hour=1, tm_min=0, tm_sec=18, tm_wday=5, tm_yday=1, tm_isdst=-1)
struct_time(tm_year=2024, tm_mon=12, tm_mday=28, tm_hour=21, tm_min=56, tm_sec=20, tm_wday=5, tm_yday=363, tm_isdst=-1)
file_date: struct_time(tm_year=2000, tm_mon=1, tm_mday=1, tm_hour=1, tm_min=0, tm_sec=24, tm_wday=5, tm_yday=1, tm_isdst=-1)
Description
No response
Additional information
This bug does not happen on XIAO ESP32-C3 with the same code. On XIAO ESP32-C3 there seams to be an background worker that syncronizes with ntp as soon as connection to internet is made. It does not need a manual ntp request.
The text was updated successfully, but these errors were encountered: