From 1f95b57fb8b03f72c7d2a2ce5b14eed5ba320407 Mon Sep 17 00:00:00 2001 From: David Olivier Date: Sun, 15 Oct 2023 19:52:53 +0200 Subject: [PATCH] Issue 6061 - Certificate lifetime displayed as NaN Bug Description: HOST_TIME_GMT is filled whith an unparsable format. Fix Description: Using `date -Iminutes` the format is compliant with "date time string format". Ensuring Date.parse() will always recognize it with right TZ. Author: Adadov Fixes: https://github.com/389ds/389-ds-base/issues/6061 Reviewed by: @vashirov, @progier389 --- src/cockpit/389-console/src/lib/ldap_editor/lib/utils.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cockpit/389-console/src/lib/ldap_editor/lib/utils.jsx b/src/cockpit/389-console/src/lib/ldap_editor/lib/utils.jsx index 5ebca397cf..fc9c898fac 100644 --- a/src/cockpit/389-console/src/lib/ldap_editor/lib/utils.jsx +++ b/src/cockpit/389-console/src/lib/ldap_editor/lib/utils.jsx @@ -998,7 +998,7 @@ export function showCertificate (certificate, showCertCallback) { 'echo ' + certificate + ' | base64 --decode | openssl x509 -inform DER -noout -subject -issuer -dates -serial ;' + // ' echo HOST_TIME_GMT=`TZ=GMT date "+%Y-%m-%d %H:%M:%S %Z"` ' // Issue with Firefox and Safari. - ' echo HOST_TIME_GMT=`TZ=GMT date`' + ' echo HOST_TIME_GMT=`date -Iminutes`' ]; let result = {};