title: using strptime converting string to time but getting garbage
body: <p>I have a problem with using strptime() function in c++. </p>
  
  <p>I found  a piece of code in stackoverflow like below and I want to store string time information on struct tm. Although I should get year information on my tm tm_year variable, I always get a garbage.Is there anyone to help me ? Thanks in advance.</p>
  
  <pre><code>    string  s = dtime;
      struct tm timeDate;
      memset(&amp;timeDate,0,sizeof(struct tm));
      strptime(s.c_str(),"%Y-%m-%d %H:%M", &amp;timeDate);
      cout&lt;&lt;timeDate.tm_year&lt;&lt;endl; // in the example below it gives me 113
      cout&lt;&lt;timeDate.tm_min&lt;&lt;endl; // it returns garbage 
  **string s will be like "2013-12-04 15:03"**
  </code></pre>