title: Converting from an integer epoch time value to local time
body: <p>I've been stuck on converting from an integer epoch time value to a local time.</p>
  
  <p>I currently have the time since epoch stored in an integer variable, and I need a way to convert that to local time.</p>
  
  <p>I have tried passing it into localtime but it doesn't seem to work.</p>
  
  <p>I can get localtime to work if I simply call</p>
  
  <pre><code>  time_t rawtime;
    struct tm * timeinfo;
  
    time ( &amp;rawtime );
    timeinfo = localtime ( &amp;rawtime );
  </code></pre>
  
  <p>And get the rawtime directly, but I'm stuck if I want to give localtime() an integer value instead of just the current time.</p>