Is there a better way to set a system clock in Python (on a Linux system)

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Thu May 13 08:50:44 EDT 2010


In message <mailman.2653.1273114075.23598.python-list at python.org>, J wrote:

> Like I said, it works well, I just wonder if there is a cleaner way of
> setting the local clock to a different time in python without having
> to do all this.

How about one line in Bash:

    date -s $(date --rfc-3339=date -d "+1 hour")




More information about the Python-list mailing list