SecureBlackbox 16: How do I change the SigningTime element to show local time?

Note: This article applies only to SecureBlackbox Legacy. For future development please consider using the latest version.

By default the SigningTime element returns UTC time, which has a format like the following: 2016-08-30T14:02:40.000Z. This article shows how to display the signing time in the local time zone, with a format like the following: 2016-08-30T14:02:400-05:00.

Set the signing time as shown below. Note that you can access the instance of the TElXMLQualifyingProperties class using the TElXAdESSigner.QualifyingProperties property only after it was generated (call the TElXAdESSigner.Generate method to create the instance).

PHP

XAdESSigner->Generate();
XAdESSigner->QualifyingProperties->SignedProperties->SignedSignatureProperties->SignedTime = SBXMLUtils\DateTimeToXMLString(SigningTime, TSBXMLDateTimeFormat::xdfFullDateTime, -300);

C#

XAdESSigner.Generate();
XAdESSigner.QualifyingProperties.SignedProperties.SignedSignatureProperties.SignedTime = SBXMLUtils.Unit.DateTimeToXMLString(  XAdESSigner.SigningTime, TSBXMLDateTimeFormat.xdfFullDateTime, -300);

We appreciate your feedback.  If you have any questions, comments, or suggestions about this article please contact our support team at kb@nsoftware.com.