From 8303cfbd2bf7799b6636bf1e9d5a018f3b719888 Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Fri, 13 Apr 2018 14:53:45 -0700 Subject: [PATCH] Fix datetime --- lemur/plugins/lemur_digicert/plugin.py | 2 +- lemur/plugins/lemur_digicert/tests/test_digicert.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lemur/plugins/lemur_digicert/plugin.py b/lemur/plugins/lemur_digicert/plugin.py index 00fe9519..0e93f487 100644 --- a/lemur/plugins/lemur_digicert/plugin.py +++ b/lemur/plugins/lemur_digicert/plugin.py @@ -157,7 +157,7 @@ def map_cis_fields(options, csr): "csr": csr, "signature_hash": signature_hash(options.get('signing_algorithm')), "validity": { - "valid_to": options['validity_end'].format('YYYY-MM-DD') + "valid_to": options['validity_end'].format('YYYY-MM-DDTHH:MM:SS' + Z) }, "organization": { "name": options['organization'], diff --git a/lemur/plugins/lemur_digicert/tests/test_digicert.py b/lemur/plugins/lemur_digicert/tests/test_digicert.py index dca24892..7b19f318 100644 --- a/lemur/plugins/lemur_digicert/tests/test_digicert.py +++ b/lemur/plugins/lemur_digicert/tests/test_digicert.py @@ -103,7 +103,7 @@ def test_map_cis_fields(app): 'signature_hash': 'sha256', 'organization': {'name': 'Example, Inc.', 'units': ['Example Org']}, 'validity': { - 'valid_to': arrow.get(2017, 5, 7).format('YYYY-MM-DD') + 'valid_to': arrow.get(2017, 5, 7).format('YYYY-MM-DDTHH:MM:SS' + Z) }, 'profile_name': None } @@ -132,7 +132,7 @@ def test_map_cis_fields(app): 'signature_hash': 'sha256', 'organization': {'name': 'Example, Inc.', 'units': ['Example Org']}, 'validity': { - 'valid_to': arrow.get(2018, 11, 3).format('YYYY-MM-DD') + 'valid_to': arrow.get(2018, 11, 3).format('YYYY-MM-DDTHH:MM:SS' + Z) }, 'profile_name': None }