https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103612
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- %y and %Y behave differently, %Y is always the full year, 0-9999, up to 4 digits. %y is if 0-99, up to 2 digits using the POSIX rules 0-68 is 2000 to 2068, 69-99 is 1969 to 1999, but intentionally for backwards compatibility if it is actually 3 or 4 digits, it is treated as %Y because that is how libstdc++ has been treating it for years.