Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Pega always sending datetimes with Z for Zulu timezone

SA-31352

Summary



The user is trying to implement a Connect-SOAP interface and as part of the requirements some DateTime and time fields must be sent following a standard format as defined in the WSDL definition.

The format expected to be passed is "YYYY-MM-DDThh:mm:ss" which is the standard format for the dateTime xsd type.

However, when sending a request from Pega, it is sending datetime attributes matching that format but with a Z at the end. This is the timezone indication for Zulu format. This is causing a validation failure in the service system.


Error Messages



Not Applicable 

Steps to Reproduce



Create a  connector and map Time and DateTime Properties.

Values from Tracer are seen appended with the Z.

Request XML:
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://xxxxx/soap/envelope/" xmlns:xsd="http://xxxx"><soapenv:Body><ns1:BookAppointmentRequest xmlns:ns1="http://soa.xxxxx/AppointmentServices"> <ns1:appointmentAction>SELECT</ns1:appointmentAction> <ns1:appointmentDate>2016-11-24T20:18:00.000Z</ns1:appointmentDate> <ns1:appointmentTimeSlot>AM</ns1:appointmentTimeSlot> <ns1:appointmentSlotStartTime>11:18:00.000Z</ns1:appointmentSlotStartTime> <ns1:appointmentSlotEndTime>14:19:00.000Z</ns1:appointmentSlotEndTime></soapenv:Body></soapenv:Envelope>


Root Cause



A third-party product issue : The Third-party service do not allow DateTime and Date properties when timeZone appended as per their Service contract. 

Resolution



Any DateTime or time properties must have time Zone appended since times at different timeZones has specific use. In this issue, since timeZone is taken as UTC by default as per their service contract. Request to use the following local change:
 
  1. Goto Connector you have created. In the response tab -> response parameters -> Map to key values.
  2. If you open this, you can find that the associated mapped property is of type DateTime or Time. Change it to some other property of type string  i.e. create a new property of type Text.
  3.  In activity, truncate the time zone from the value of created text property.

For truncation you can use the inbuilt function @substring(<property>,<initial index>,<end index>).

 

Published January 4, 2017 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us