title: Extract files from zip file and retain mod date?
body: <p>I'm trying to extract files from a zip file using Python 2.7.1 (on Windows, fyi) and each of my attempts shows extracted files with Modified Date = time of extraction (which is incorrect).</p>
  
  <pre><code>import os,zipfile
  outDirectory = 'C:\\_TEMP\\'
  inFile = 'test.zip'
  fh = open(os.path.join(outDirectory,inFile),'rb') 
  z = zipfile.ZipFile(fh)
  for name in z.namelist():
      z.extract(name,outDirectory)
  fh.close()
  </code></pre>
  
  <p>I also tried using the .extractall method, with the same results.  </p>
  
  <pre><code>import os,zipfile
  outDirectory = 'C:\\_TEMP\\'
  inFile = 'test.zip'
  zFile = zipfile.ZipFile(os.path.join(outDirectory,inFile))        
  zFile.extractall(outDirectory)
  </code></pre>
  
  <p>Can anyone tell me what I'm doing wrong?</p>
  
  <p>I'd like to think this is possible without having to post-correct the modified time per <a href="https://stackoverflow.com/questions/4996405/how-do-i-change-the-file-creation-date-of-a-windows-file">How do I change the file creation date of a Windows file?</a>.</p>