https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126543
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <[email protected]>: https://gcc.gnu.org/g:3d1c848cd57e9c991b5e670fdc11d819cf999b5b commit r17-4929-g3d1c848cd57e9c991b5e670fdc11d819cf999b5b Author: Jonathan Wakely <[email protected]> Date: Mon Aug 3 19:23:51 2026 +0100 libstdc++: Make chrono::parse support valid leap seconds [PR126543] Formatting utc_time can produce a time ending with ":60" for a leap second, so we should also be able to read that back using chrono::parse. We should reject ":60" unless the time really is a leap second, so check that the full time was 23:59:60 and do a lookup in the list of known leap seconds. Continue to reject ":60" for time points except utc_time. libstdc++-v3/ChangeLog: PR libstdc++/126543 * include/bits/chrono_io.h (from_stream(..., utc_time&, ...)): Use chrono::get_leap_second_info to check for valid leap seconds. (_Parser::operator()) <R>: Do not accept "60" for minutes. <S>: Accept "60" for seconds. * testsuite/std/time/parse/114279.cc: Use a real leap second as the test input. Check parsing whole seconds as well as fractional seconds. * testsuite/std/time/parse/126543.cc: New test. Reviewed-by: Tomasz KamiÅski <[email protected]>
