https://github.com/python/cpython/commit/4f14b7e30c0243e81407a34968495301e829a033
commit: 4f14b7e30c0243e81407a34968495301e829a033
branch: main
author: Samuel Tyler <fosslinux@aussies.space>
committer: malemburg <m...@lemburg.com>
date: 2025-03-03T14:59:46+01:00
summary:

gh-100388: Change undefined __DATE__ to the Unix epoch (#100389)

files:
A 
Misc/NEWS.d/next/Core_and_Builtins/2022-12-21-14-28-01.gh-issue-100388.vne8ky.rst
M Modules/getbuildinfo.c

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 00000000000000..d859c5511e6dc1
--- /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 8d553d106c6ab5..b68f0f5cc56a44 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
 

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to