-->

Docusign gives incorrect TimezoneOffset in WebHook

2019-06-07 07:43发布

问题:

We are using WebHook Event also known as Connect which is like a SOAP APIs call to update the document signature status in our web application. When a DocuSign document is created or updated the XML data that is pushed in the Webhook events contains invalid TimeZoneOffset data.

For instance: the offset for Indian Standard Time is +5:30 but in the xml it says only 5.

Please see below the snippet of the xml:

<DocuSignEnvelopeInformation>
        ...
            </DocumentStatus>
        </DocumentStatuses>
    </EnvelopeStatus>
    <TimeZone>India Standard Time</TimeZone>
    <TimeZoneOffset>5</TimeZoneOffset>

回答1:

This is a common misconception and why I had the Documentation Team document this, as my customers | Developers always ask this. Below is the link that explains what time/date settings and formats effect what date/time data.

https://www.docusign.com/p/APIGuide/Content/Introduction+Changes/Appendix-Time%20Zone.htm

Excerpt below:

REST API: When getting information from the REST API, all non-PDF time zone responses are returned in ISO 8601 date/time format using GMT as the time zone. PDF items retrieved through the REST API, such as a Certificate of Completion or documents with date tags, use Certificate of Completion and PDF documents settings previously described.

SOAP API: When getting information from the SOAP API, all non-PDF items use the time zone set by the Time Zone Used For API option. PDF items retrieved through the SOAP API, such as a Certificate of Completion or documents with date tags, use Certificate of Completion and PDF documents settings previously described.

Date/Time Formats for API Calls All DocuSign SOAP and REST API requests must use ISO 8601 date/time formats. The REST API assumes that all values passed represent UTC date/times.

When providing a date/time format for the DocuSign REST API, the preferred formats are:

"yyyy-MM-dd | HH:mm" "MMMM d, yyyy | HH:mm" "MMM-dd-yyyy | HH:mm" "dd-MM-yyyy | HH:mm"



回答2:

I just confirmed that this issue remains open. I had my API timezone set to Nepal (GMT+5:45) and received a Connect POST which included the following:

Nepal Standard Time5

The fractional portion (0:45) is omitted.

Mr. Grigsby's response is very interesting, but doesn't have anything to do with the fact that the offsets for Nepal Standard Time and India Standard Time are not 5, and thus the information posted by Connect/Webhook is not correct.

However, there is a straight-forward workaround. There are only a handful of such timezones across the world. We can incorporate a dictionary of them in our webhook handlers and thereby determine the offset based on the node values.

Implementing my workaround now. This looks handy: https://www.timeanddate.com/time/time-zones-interesting.html



标签: docusignapi