]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-100388: Change undefined __DATE__ to the Unix epoch (#100389)
authorSamuel Tyler <fosslinux@aussies.space>
Mon, 3 Mar 2025 13:59:46 +0000 (00:59 +1100)
committerGitHub <noreply@github.com>
Mon, 3 Mar 2025 13:59:46 +0000 (14:59 +0100)
Misc/NEWS.d/next/Core_and_Builtins/2022-12-21-14-28-01.gh-issue-100388.vne8ky.rst [new file with mode: 0644]
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 (file)
index 0000000..d859c55
--- /dev/null
@@ -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.
index 8d553d106c6ab5bd108e2d1a4f67d305b4a8c39f..b68f0f5cc56a44ce47978d7298c6cadce10cc8c9 100644 (file)
@@ -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