diff options
author | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2018-10-14 02:45:24 (GMT) |
---|---|---|
committer | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2018-10-15 02:29:56 (GMT) |
commit | a61f52da75cad382d482ae13a9e3d30d4870f87b (patch) | |
tree | 53f954982e376354227df2aff5076d169561f9bc /SConstruct | |
parent | 0c20ae2e5d1e093a3993f94eba454ca110cf1dd3 (diff) | |
download | SCons-a61f52da75cad382d482ae13a9e3d30d4870f87b.zip SCons-a61f52da75cad382d482ae13a9e3d30d4870f87b.tar.gz SCons-a61f52da75cad382d482ae13a9e3d30d4870f87b.tar.bz2 |
Allow to override build date with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
Also consistently use ISO 8601 date format
to be understood everywhere.
Also use gmtime to be independent of timezone.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |