title: How to properly convert a unix timestamp string to time_t in C++11?
body: <p>Lets say we have a text file and read some timestamp from there into a local variable "sTime":</p>
  
  <pre><code>std::string sTime = "1440966379" // this value has been read from a file.
  std::time_t tTime = ? // this instance of std::time_t shall be assigned the above value.
  </code></pre>
  
  <p>How do I convert this string properly into std::time assuming:</p>
  
  <ol>
  <li>We may use STL means only (no boost).</li>
  <li>We use the C++11 standard</li>
  <li>We don't know which CPU architecture/OS we're using (it should work cross plattform)</li>
  <li>We can not make any (static) assumptions on how time_t is internally defined. Of course we know that in most cases it will be an integral type, probably of 32 or 64 bit length, but according to <a href="http://en.cppreference.com/w/cpp/chrono/c/time_t" rel="noreferrer">cppreference.com</a> the actual typedef of time_t is not specified. So atoi, atol, atoll, strtoul ... etc. are out of question at least until we have made sure by other means that we actually did pick the correct one out of those possible candidates.</li>
  </ol>