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

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);

Ready to get started?

Learn more about SecureBlackbox or download a free trial.

Download Now