title: Convert number of seconds to time
body: <p>Is there a way to convert the number of seconds (e.g. <code>3056144 sec</code>, this is time delta not a time) to time in format <code>YYYY-mm-dd HH:MM:SS</code>?</p>
  
  <p>I've tried to convert number of seconds to <code>struct tm</code> using <code>localtime</code> and then substract UNIX start time (1970-01-01), but this is not working as expected.</p>
  
  <p>Thanks in advance.</p>
  
  <p>P.S. I have to use C++03, not C++11.</p>