3 years ago
Just today I connected a DS3231 Real Time Clock module to my Pi - to use
when it cannot connect to the internet to get its current time from an NTP
I'm using python to retrieve the date and time from the RTC module and
display it. But now I'm stuck at the point where I need to set Raspberry
Pi's clock with it. I've been googeling for at least half an hour, but
can't seem to find how to *set* the current time.
De closest I have been is to execute
"datetime.datetime(2019,11,02,16,06,0) - which gets ignored without any kind
of error or warning message ...
Added problem: The Pi might (ofcourse) have problems with "a mere user"
trying to change the system clock, and might need some kind of "sudo". How
do I do that from within "Thonny" (in the "shell" window) ?