title: Setting the system date in Python (on Windows)
body: <p>There appears to be many packages for getting/formatting the current date, or finding out the date n time intervals from now. But I must be overlooking the existence of a simple method to set the date (like Windows' date.exe) in Python.</p>
  
  <p>Surely such a function exists? I've been unable to find anything on Google, the python docs (datetime, time, os, etc) or stack overflow. TIA.</p>
  
  <p>edit: To summarize,<a href="http://www.saltycrane.com/blog/2008/06/how-to-get-current-date-and-time-in/" rel="noreferrer">this</a> page tells you how to <strong>get</strong> them.</p>
  
  <p>And you can set them using either</p>
  
  <pre><code>win32api.SetSystemTime(year,month,dayOfWeek,day,hour,minute,second,millseconds)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>os.system("date " + mm/dd/yy)
  </code></pre>
  
  <p>date.exe also appears to accept mm-dd-yy, 4-digit years, and probably other alternatives.</p>
  
  <p>I prefer the latter for simplicity.</p>