Skip to content

Commit 4f14b7e

Browse files
authored
gh-100388: Change undefined __DATE__ to the Unix epoch (#100389)
1 parent 3146a25 commit 4f14b7e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix the ``platform._sys_version()`` method when ``__DATE__`` is undefined at
2+
buildtime by changing default buildtime datetime string to the UNIX epoch.

Modules/getbuildinfo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
#ifdef __DATE__
1414
#define DATE __DATE__
1515
#else
16-
#define DATE "xx/xx/xx"
16+
#define DATE "Jan 01 1970"
1717
#endif
1818
#endif
1919

2020
#ifndef TIME
2121
#ifdef __TIME__
2222
#define TIME __TIME__
2323
#else
24-
#define TIME "xx:xx:xx"
24+
#define TIME "00:00:00"
2525
#endif
2626
#endif
2727

0 commit comments

Comments
 (0)