]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/strutl.cc
Revert "travis: use gcc-5 instead of gcc(-4.8)"
[apt.git] / apt-pkg / contrib / strutl.cc
index 1d9577125de2cbaff636b7e32ec8150bb7be441c..d0bc938e44c6adad5b3449e266c24b6d21b888bc 100644 (file)
@@ -757,7 +757,10 @@ string TimeRFC1123(time_t Date)
    auto const posix = std::locale("C.UTF-8");
    std::ostringstream datestr;
    datestr.imbue(posix);
    auto const posix = std::locale("C.UTF-8");
    std::ostringstream datestr;
    datestr.imbue(posix);
-   datestr << std::put_time(&Conv, "%a, %d %b %Y %H:%M:%S GMT");
+   APT::StringView const fmt("%a, %d %b %Y %H:%M:%S GMT");
+   std::use_facet<std::time_put<char>>(posix).put(
+                    std::ostreambuf_iterator<char>(datestr),
+                    datestr, ' ', &Conv, fmt.data(), fmt.data() + fmt.size());
    return datestr.str();
 }
                                                                        /*}}}*/
    return datestr.str();
 }
                                                                        /*}}}*/