title: How to convert std::chrono::time_point to std::tm without using time_t?
body: <p>I would like to print or extract year/month/day values.</p>
  
  <p>I don't want to use <code>time_t</code> because of the year 2038 problem, but all examples I found on the Internet use it to convert <code>time_point</code> to <code>tm</code>.</p>
  
  <p>Is there a simple way to convert from time_point to tm (preferably <em>without boost</em>)?</p>
  
  <hr>
  
  <p>An implementation like <strong>timesub</strong> from <strong>libc</strong> would be my last resort:
  <a href="http://www.opensource.apple.com/source/Libc/Libc-262/stdtime/localtime.c" rel="noreferrer">http://www.opensource.apple.com/source/Libc/Libc-262/stdtime/localtime.c</a></p>
  
  <hr>
  
  <p><strong>Edit:</strong> After reading the suggested links and doing some more research, I came to the following conclusion.</p>
  
  <ol>
  <li>Using time_t where it is 64bit long is ok (for most purposes).</li>
  <li>Using Boost.Date_Time for portable code.</li>
  </ol>
  
  <p>It is noteworthy that Boost.Date_Time can be a header-only library. Source:
  <a href="http://www.boost.org/doc/libs/1_53_0/more/getting_started/unix-variants.html#header-only-libraries" rel="noreferrer">http://www.boost.org/doc/libs/1_53_0/more/getting_started/unix-variants.html#header-only-libraries</a></p>