TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: R.WIESER
date: 2019-11-02 17:46:00
subject: Re: Python - set current

Alexandre,

> You don't.

Really ?    No straightforward way to set the system clock from within a
python script (ran with sudo privileges) ?   Thats ... odd.

> I'd use the command line: "sudo hwclock -s" (see: man hwclock). Only works
> if your rtc is recognised

I know that I can do that, but thats not my intention.

For all intents-and-purposes you can forget all about the RTC, leaving just
the "using python, how do I set the time?" part.

Regards,
Rudy Wieser

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.