diff --git a/SConstruct b/SConstruct index f644d6d759..773bacb30d 100644 --- a/SConstruct +++ b/SConstruct @@ -73,7 +73,7 @@ zip = whereis('zip') # date = ARGUMENTS.get('DATE') if not date: - date = time.strftime("%Y/%m/%d %H:%M:%S", time.localtime(time.time())) + date = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) developer = ARGUMENTS.get('DEVELOPER') if not developer: diff --git a/doc/SConscript b/doc/SConscript index 82b29a69b8..5f3d559a9c 100644 --- a/doc/SConscript +++ b/doc/SConscript @@ -131,8 +131,9 @@ if skip_doc: if not os.path.isdir(scdir): os.makedirs(scdir) - import datetime - today = datetime.date.today().strftime("%m/%d/%Y") + import time + today = time.strftime("%Y-%m-%d", + time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) version = env.subst('$VERSION') for m in man_page_list: man, _ = os.path.splitext(m) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 56127ae07b..908df6bcfe 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -162,6 +162,11 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE Three uses of variables not defined are changed. - Some script changes in trying to find scons engine + From Bernhard M. Wiedemann: + - Allow to override build date with SOURCE_DATE_EPOCH for SCons itself, + but not for software built with SCons. + - Datestamps in docs and embedded in code use ISO 8601 format and UTC + From Hao Wu - typo in customized decider example in user guide