]> git.saurik.com Git - apt.git/commit
avoid std::get_time usage to sidestep libstdc++6 bug
authorDavid Kalnischkies <david@kalnischkies.de>
Fri, 17 Jun 2016 15:56:45 +0000 (17:56 +0200)
committerJulian Andres Klode <jak@debian.org>
Mon, 14 Nov 2016 14:10:03 +0000 (15:10 +0100)
commit5d467e2092a9e4083f86b5f9bbea49fb4e7e3850
tree1702d7282b31b9730db76cac1ba648a2fba6016a
parent76277d6f6c6cbcec83a52d3b1399061326c7574e
avoid std::get_time usage to sidestep libstdc++6 bug

As reported upstream in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71556
the implementation of std::get_time is currently not as accepting as
strptime is, especially in how hours should be formatted.

Just reverting 9febc2b238e1e322dce1f94ecbed46d595893b52 would be
possible, but then we would reopen the problems fixed by it, so instead
I opted here for a rewrite of the parsing logic which makes this method
a lot longer, but at least it provides the same benefits as the rewrite
in std::get_time was intended to give us and decouples us from the fix
of the issue in the standard library implementation of GCC.

LP: 1593583
(cherry picked from commit 1d742e01470bba27715a8191c50adde4b39c2f19)
apt-pkg/contrib/strutl.cc
test/libapt/strutil_test.cc