diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2022-12-21-14-28-01.gh-issue-100388.vne8ky.rst b/Misc/NEWS.d/next/Core_and_Builtins/2022-12-21-14-28-01.gh-issue-100388.vne8ky.rst new file mode 100644 index 00000000000..d859c5511e6 --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2022-12-21-14-28-01.gh-issue-100388.vne8ky.rst @@ -0,0 +1,2 @@ +Fix the ``platform._sys_version()`` method when ``__DATE__`` is undefined at +buildtime by changing default buildtime datetime string to the UNIX epoch. diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c index 8d553d106c6..b68f0f5cc56 100644 --- a/Modules/getbuildinfo.c +++ b/Modules/getbuildinfo.c @@ -13,7 +13,7 @@ #ifdef __DATE__ #define DATE __DATE__ #else -#define DATE "xx/xx/xx" +#define DATE "Jan 01 1970" #endif #endif @@ -21,7 +21,7 @@ #ifdef __TIME__ #define TIME __TIME__ #else -#define TIME "xx:xx:xx" +#define TIME "00:00:00" #endif #endif