Skip to content

Commit

Permalink
Issue 6061 - Certificate lifetime displayed as NaN
Browse files Browse the repository at this point in the history
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: #6061

Reviewed by: @vashirov, @progier389
  • Loading branch information
Adadov authored and vashirov committed Jan 31, 2024
1 parent 05b947a commit 1f95b57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cockpit/389-console/src/lib/ldap_editor/lib/utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down

0 comments on commit 1f95b57

Please sign in to comment.