You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
time.strftime() returns a wrong ISO 8601 week number (%V) on OpenBSD #154460
The week number is 53 whenever the ISO 8601 week belongs to other year than the calendar year. %G and %u are correct.
This is a bug in OpenBSD's wcsftime(); its strftime() returns the correct value for the same struct tm. Both contain the same obsolete XPG4-1994 override of the already computed week number, but in strftime.c it is wrapped in #ifdef XPG4_1994_04_09 (never defined), and in wcsftime.c the guard is missing. Reported to bugs@openbsd.org.
We use wcsftime() when HAVE_WCSFTIME is defined, so we can avoid the broken function on OpenBSD. HAVE_WCSFTIME is only used in Modules/timemodule.c, and OpenBSD only supports the C and UTF-8 encodings for LC_CTYPE, so decoding the result of strftime() with the locale encoding is safe there.
Activity
gh-154460: Do not use wcsftime() on OpenBSD (#154461)
[3.13] gh-154460: Do not use wcsftime() on OpenBSD (GH-154461) (GH-15…
[3.14] gh-154460: Do not use wcsftime() on OpenBSD (GH-154461) (GH-15…
[3.15] gh-154460: Do not use wcsftime() on OpenBSD (GH-154461) (GH-15…