title: subprocess.Popen strange behavior Python 3 macOS
body: <p>I'm trying to change the creation date metadata of a file on macOS using python. The macOS shell command to do that is <code>SetFile -d '01/03/2012 12:00:00 PM' /path/to/file</code>.
  I'm using the <code>subprocess</code> module to run a shell command in python, here is my code:</p>
  <pre><code>import subprocess
  
  path = '/Users/marinnagy/Desktop/banner.jpg'
  subprocess.Popen(['SetFile', '-d', '&quot;01/03/2012 12:00:00 PM&quot;', path])
  </code></pre>
  <p>No error occurs when running the script and the creation date of the file changes but to the wrong date. For this example, the date is changed to December 4th, 2011 (12/04/2011) instead of January 3st 2012. The shell command works well when used from the terminal, but the date is goes wrong when called from subprocess.</p>
  <p><a href="https://ss64.com/osx/setfile.html" rel="nofollow noreferrer">Here</a> is some information about the <code>SetFile</code> command, the date format is <code>mm/dd/[yy]yy [hh:mm:[:ss] [AM | PM]]</code></p>
  <p>Why is date wrong when using the command from subprocess, and how to fix it? Maybe I miss something, my computer is set to the french time format (dd/mm/yyyy) but doesn't seems to be linked.</p>