title: Serialize boost ptime with custom format
body: <p>I have to serialize to a string a <code>boost::posix_time::ptime</code> variable. The format I want is this: <code>2014-05-12T16:14:01.809+0200</code>. I can't change it because it is requested from a web service and I must comply the format requested.
  I can imply that the timezone is the local one.
  I saw some examples but I have not found anything that makes me get a <code>std::string</code> from an UTC ptime.</p>
  
  <p>Added some details about what I want:
  I start from a <code>boost::posix_time::ptime</code>. I want to print it in the format I specified before but I don't know what is my real time zone. I have to find it through a library function call.
  Then what I have to do is to write a function with this prototype: <code>std::string time_to_custom_string(boost::posix_time::ptime datetime);</code></p>