title: C++ strftime() incorrect output
body: <pre><code>#include &lt;ctime&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      char dateStringBuffer[256] = "";
      tm date;
  
      date.tm_year = 2017;
      date.tm_mon = 9;
      date.tm_mday = 13;
  
      strftime(dateStringBuffer, 256, "%d.%m.%Y", &amp;date);
      cout &lt;&lt; dateStringBuffer;
  }
  </code></pre>
  
  <p>The output is:</p>
  
  <blockquote>
    <p>13.10.3917 </p>
  </blockquote>
  
  <p>Expected output:</p>
  
  <blockquote>
    <p>13.09.2017</p>
  </blockquote>
  
  <p>It makes no sense to me. What did I do wrong?</p>