diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 5 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 1d9577125..d0bc938e4 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -757,7 +757,10 @@ string TimeRFC1123(time_t Date) 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(); } /*}}}*/ diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index d8e838882..5e27c2686 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1233,9 +1233,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) if (notconfidx != std::numeric_limits<decltype(notconfidx)>::max()) { if (ConfigurePending) - List.erase(std::next(List.cbegin(), notconfidx), std::prev(List.cend())); + List.erase(std::next(List.begin(), notconfidx), std::prev(List.end())); else - List.erase(std::next(List.cbegin(), notconfidx), List.cend()); + List.erase(std::next(List.begin(), notconfidx), List.end()); } d->stdin_is_dev_null = false; |