datetime

Max readmax at hushmail.com
Thu Sep 13 11:19:32 EDT 2012


How do I set the time in Python?

Also, is there any *direct* way to shift it?

Say, it's 09:00 now and Python makes it 11:30 *without* me having specified
"11:30" but only given Python the 2h30m interval.

Note that any "indirect" methods may need complicated ways to keep
track of the milliseconds lost while running them. It even took around one
second in some virtual machine guest systems. So I'm hoping Python happens to
have the magic needed to do the job for me.




More information about the Python-list mailing list