diff --git a/CHANGES b/CHANGES index 3f387b9c5a2..1a6a22341f7 100644 --- a/CHANGES +++ b/CHANGES @@ -125,6 +125,7 @@ Bugs fixed * #6375: extlinks: Cannot escape angle brackets in link caption * #6378: linkcheck: Send commonly used User-Agent * #6387: html search: failed to search document with haiku and scrolls themes +* #6406: Wrong year is returned for ``SOURCE_DATE_EPOCH`` Testing -------- diff --git a/sphinx/util/i18n.py b/sphinx/util/i18n.py index e342b12463d..8638d4058be 100644 --- a/sphinx/util/i18n.py +++ b/sphinx/util/i18n.py @@ -248,7 +248,7 @@ def find_catalog_source_files(locale_dirs, locale, domains=None, gettext_compact '%x': 'medium', # Locale’s appropriate date representation. '%X': 'medium', # Locale’s appropriate time representation. '%y': 'YY', # Year without century as a zero-padded decimal number. - '%Y': 'YYYY', # Year with century as a decimal number. + '%Y': 'yyyy', # Year with century as a decimal number. '%Z': 'zzzz', # Time zone name (no characters if no time zone exists). '%%': '%', }