summaryrefslogtreecommitdiff
path: root/site_scons
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2021-07-18 15:52:47 -0700
committerWilliam Deegan <bill@baddogconsulting.com>2021-07-18 15:52:47 -0700
commite8067ad4ab51da67c666f8db91256dfab2197acc (patch)
tree6a93eed5b14a3c20824a788110fd818c4356963a /site_scons
parent622027e2566dfb820d0681b592583053092a6f5f (diff)
downloadscons-git-e8067ad4ab51da67c666f8db91256dfab2197acc.tar.gz
fix doc release date to be the same as the format in CHANGES.txt,etc
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/BuildCommandLine.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/site_scons/BuildCommandLine.py b/site_scons/BuildCommandLine.py
index dc269b6fa..3a3622e95 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: