TrivialFix: Use recommended date time format
update html_last_updated_fmt in api-ref/source/conf.py use the recommended '%Y-%m-%d %H:%M' data time format. Change-Id: I144d86c8a5e0228d2dddf58d7d8a98f453353ac5
This commit is contained in:
parent
d2eb42646f
commit
54eb196577
@ -24,9 +24,7 @@
|
||||
# serve to show the default.
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
extensions = [
|
||||
'os_api_ref',
|
||||
@ -159,13 +157,7 @@ html_context = {'bug_tag': 'api-ref',
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
# html_last_updated_fmt = '%b %d, %Y'
|
||||
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
|
||||
"-n1"]
|
||||
try:
|
||||
html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
|
||||
except Exception:
|
||||
warnings.warn('Cannot get last updated time from git repository. '
|
||||
'Not setting "html_last_updated_fmt".')
|
||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
|
Loading…
Reference in New Issue
Block a user