Certificate Management - Certificate Expiration Date is not converted to local time


Description

Certificate Management - Certificate Expiration Date is not converted to local time
In Renew certificate form in portal, certificate expiration date is not converted to local time

Steps to Reproduce

1. Open the Renew Certificate form in Portal and choose any certificate.
2. Check the Certificate Expiration Date.
3. Find this Certificate in the cmdb_ci_certificate table.
4. Compare Certificate Expiration Date with the date on the portal form.

Workaround

Workaround:

In Renew certificate form in portal,
Client script is calling data from
https://<instance_name>.service-now.com/nav_to.do?uri=catalog_script_client.do?sys_id=4d14e4f23b8333000fd4cedf34efc4bb%26sysparm_view=item

g_form.setValue('certificate_expiry_date', certObj.valid_to);

The data is getting from script include :
DiscoveryCertificateManagementUtils
https://<instance_name>.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=84a4d5646722330022646c706785ef5d

certObj['valid_from'] = certGR.getValue('valid_from');
certObj['valid_to'] = certGR.getValue('valid_to');

=======
Inorder to correct it, we need to correct it as below:

certObj['valid_from'] = certGR.getDisplayValue('valid_from');
certObj['valid_to'] = certGR.getDisplayValue('valid_to');

 


Related Problem: PRB1515825