title: How to pass current datetime in npm script for git commit message in Windows and cross platform?
body: <p>I am working in Windows 10 and trying to use npm script for git commit with message that includes date and time of the commit:</p>
  
  <pre><code>"deploy": "cd dist &amp;&amp; git add . &amp;&amp; git commit -m \"Release at $(date)\" &amp;&amp; git push"
  </code></pre>
  
  <p>Resulting git commit message is </p>
  
  <blockquote>
    <p>Release at $(date)</p>
  </blockquote>
  
  <p>instead of</p>
  
  <blockquote>
    <p>Release at 03/06/2019 11:43:57</p>
  </blockquote>
  
  <p>that I get when running in terminal the same command:</p>
  
  <pre><code>git commit -m "Release at $(date)"
  </code></pre>
  
  <p>What is a cross platform solution ?</p>
  
  <p>Can you explain what causes different results ?</p>