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

Alexandre,

>> No straightforward way to set the system clock
>
> Not from the Thonny REPL.

And not from within "python3 script.py" either.

> Yes. See https://stackoverflow.com/a/12292874 plus the replies to that and
> other answers.

Yep, while googeling I found that one too.    Its from eight years back
though, which 1) made me think it could be old, not compatible to v3 code
and 2) made me hope that python had, in the mean time, added the
functionality.

I just ran the _linux_set_time() code by tMC (Sep 6 '12 at 4:12).   It
doesn't throw errors when run in user mode, and does seem to work when
sudo-ed.   I'll have to study that code to see how it works.

Thanks for the pointer.

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™.