mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
makepanda: Fix strftime error using SOURCE_DATE_EPOCH on Windows
Seems to occur when using Python 2.7
This commit is contained in:
parent
ce437629c2
commit
d4830f40f0
@ -3006,7 +3006,12 @@ def CreatePandaVersionFiles():
|
|||||||
if source_date:
|
if source_date:
|
||||||
# This matches the GCC / Clang format for __DATE__ __TIME__
|
# This matches the GCC / Clang format for __DATE__ __TIME__
|
||||||
source_date = time.gmtime(int(source_date))
|
source_date = time.gmtime(int(source_date))
|
||||||
source_date = time.strftime('%b %e %Y %H:%M:%S', source_date)
|
try:
|
||||||
|
source_date = time.strftime('%b %e %Y %H:%M:%S', source_date)
|
||||||
|
except ValueError:
|
||||||
|
source_date = time.strftime('%b %d %Y %H:%M:%S', source_date)
|
||||||
|
if source_date[3:5] == ' 0':
|
||||||
|
source_date = source_date[:3] + ' ' + source_date[5:]
|
||||||
pandaversion_h += "\n#define PANDA_BUILD_DATE_STR \"%s\"\n" % (source_date)
|
pandaversion_h += "\n#define PANDA_BUILD_DATE_STR \"%s\"\n" % (source_date)
|
||||||
|
|
||||||
if not RUNTIME:
|
if not RUNTIME:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user