title: C - Convert time_t to string with format YYYY-MM-DD HH:MM:SS
body: <p>Is there any way to convert a <code>time_t</code> to a <code>std::string</code> with the format <strong>YYYY-MM-DD HH:MM:SS</strong> automatically while keeping the code portable?</p>