diff options
author | William Deegan <bill@baddogconsulting.com> | 2021-07-18 22:52:47 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2021-07-18 22:52:47 (GMT) |
commit | e8067ad4ab51da67c666f8db91256dfab2197acc (patch) | |
tree | 6a93eed5b14a3c20824a788110fd818c4356963a /site_scons/BuildCommandLine.py | |
parent | 622027e2566dfb820d0681b592583053092a6f5f (diff) | |
download | SCons-e8067ad4ab51da67c666f8db91256dfab2197acc.zip SCons-e8067ad4ab51da67c666f8db91256dfab2197acc.tar.gz SCons-e8067ad4ab51da67c666f8db91256dfab2197acc.tar.bz2 |
fix doc release date to be the same as the format in CHANGES.txt,etc
Diffstat (limited to 'site_scons/BuildCommandLine.py')
-rw-r--r-- | site_scons/BuildCommandLine.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/site_scons/BuildCommandLine.py b/site_scons/BuildCommandLine.py index dc269b6..3a3622e 100644 --- a/site_scons/BuildCommandLine.py +++ b/site_scons/BuildCommandLine.py @@ -67,13 +67,26 @@ class BuildCommandLine: self.init_command_line_variables() + def set_date(self): + """ + Determine the release date and the pattern to match a date + Mon, 05 Jun 2010 21:17:15 -0700 + NEW DATE WILL BE INSERTED HERE + """ + + min = (time.daylight and time.altzone or time.timezone) // 60 + hr = min // 60 + min = -(min % 60 + hr * 100) + self.date = (time.strftime('%a, %d %b %Y %X', time.localtime()) + + ' %+.4d' % min) + def process_command_line_vars(self): # # Now grab the information that we "build" into the files. # self.date = ARGUMENTS.get('DATE') if not self.date: - self.date = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) + self.set_date() self.developer = ARGUMENTS.get('DEVELOPER') if not self.developer: |