title: Converting millisecond UTC to Human Readable Date_Time
body: <p>I'm struggling to figure out how to preform a conversion with boost::date_time.
  I want to convert a millisecond value measured from the Unix epoch (00:00, Jan 1, 1970)  to a human readable string - something like: <code>2/13/2012 15:20:11</code> would be ideal.</p>
  
  <p>I've tried some std C++ / boost suggestions I've seen but not had any luck just yet. Here is the code I use:</p>
  
  <pre><code>    long long ticksFromEpoch = 1329117220501;
  
      std::time_t tt = static_cast&lt;time_t&gt;(ticksFromEpoch);
  
      boost::posix_time::ptime dt = boost::posix_time::from_time_t(tt);
  
      // Create a time_zone_ptr for the desired time zone and use it to create a local_date_time
      boost::local_time::time_zone_ptr zone(new boost::local_time::posix_time_zone("UTC"));
      boost::local_time::local_date_time dt_with_zone(dt, zone);
  
      std::stringstream strm;
  
      strm.imbue(std::locale(std::cout.getloc(), new boost::local_time::local_time_facet("%Y-%m-%d %H:%M:%S"))); // 15:14
      strm &lt;&lt; dt_with_zone;
  
      // Print the stream's content to the console
      std::cout &lt;&lt; strm.str() &lt;&lt; std::endl;
  </code></pre>
  
  <p>The output is: <code>2032-07-01 20:20:37</code> which is clearly incorrect. I suspect that I'm not constructing the <code>ticksFromEpoch</code> variable correctly but I'm not sure why. Can anyone point me in the right direction? Any help is much appreciated!!</p>