summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJan Dittberner <jandd@cacert.org>2016-05-07 13:12:49 +0200
committerJan Dittberner <jandd@cacert.org>2016-05-07 13:12:49 +0200
commitff88c389a76d7795d931d5c4f8f778876830133b (patch)
treefafb891430e6914ec8f26bd7c82db9f1d432f877 /docs
parent8717534607ba2bd22d4d712cd9acb0ae5f5c533b (diff)
downloadcacert-infradocs-ff88c389a76d7795d931d5c4f8f778876830133b.tar.gz
cacert-infradocs-ff88c389a76d7795d931d5c4f8f778876830133b.tar.xz
cacert-infradocs-ff88c389a76d7795d931d5c4f8f778876830133b.zip
Show ISO 8601 formatted expiration dates
This commit implements parsing of expiration dates and rendering of the result in ISO 8601 format.
Diffstat (limited to 'docs')
-rw-r--r--docs/sphinxext/cacert.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/sphinxext/cacert.py b/docs/sphinxext/cacert.py
index a7e645e..1dd731a 100644
--- a/docs/sphinxext/cacert.py
+++ b/docs/sphinxext/cacert.py
@@ -19,6 +19,8 @@ from sphinx import addnodes
from sphinx.errors import SphinxError
from sphinx.util.nodes import set_source_info, make_refnode
+from dateutil.parser import parse as date_parse
+
class sslcert_node(nodes.General, nodes.Element):
pass
@@ -56,8 +58,7 @@ def subject_alternative_names(argument):
def expiration_date(argument):
- # TODO: normalize to internal format
- return directives.unchanged_required(argument)
+ return date_parse(directives.unchanged_required(argument))
class CAcertSSLCert(Directive):
@@ -273,7 +274,6 @@ def _format_serial_number(serial):
def _format_expiration_date(expiration):
- # TODO use a normalized date format
return nodes.paragraph(text=expiration)