datetime - Setting the system date in Python (on Windows) -


There are several packages available for obtaining current / formatting, or from now on date n detects time intervals.

But I have to ignore the existence of a simple method to set the date in Python (like 'windows' date. Exe).

Definitely such a function exists? I'm unable to find anything on Google, Python Docs (Data Time, Time, OS, etc.) or Stack Overflow. TIA

EDIT: To summarize, the page tells you how to get .

and you

  win32api.SetSystemTime (year, month, day, week, day, hour, minute, second, mills)  

or

  os.system ("date" + mm / dd / yon)  

date. Exe also seems to accept mm-dd-yy, 4-digit years, and maybe other options.

I like the latter for simplicity.

You should be able to use. This is part of it.


Comments