简体   繁体   English

Docusign 在 WebHook 事件数据中给出了错误的 TimezoneOffset

[英]Docusign gives incorrect TimezoneOffset in WebHook Event data

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.我们正在使用WebHook事件,也称为 Connect,它类似于 SOAP API 调用来更新我们的 Web 应用程序中的文档签名状态。 When a DocuSign document is created or updated the XML data that is pushed in the Webhook events contains invalid TimeZoneOffset data.创建或更新 DocuSign 文档时,在 Webhook 事件中推送的 XML 数据包含无效的 TimeZoneOffset 数据。

For instance: the offset for Indian Standard Time is +5:30 but in the xml it says only 5 .例如:印度标准时间的偏移量是+5:30但在 xml 中它只说5

Please see below the snippet of the xml:请参阅下面的 xml 片段:

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

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:我将 API 时区设置为尼泊尔 (GMT+5:45) 并收到了一个 Connect POST,其中包括以下内容:

Nepal Standard Time5尼泊尔标准时间5

The fractional portion (0:45) is omitted.小数部分 (0:45) 被省略。

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. Grigsby 先生的回答很有趣,但与尼泊尔标准时间和印度标准时间的偏移量不是 5 的事实没有任何关系,因此 Connect/Webhook 发布的信息不正确。

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.我们可以将它们的字典合并到我们的 webhook 处理程序中,从而根据节点值确定偏移量。

Implementing my workaround now.现在实施我的解决方法。 This looks handy: https://www.timeanddate.com/time/time-zones-interesting.html这看起来很方便: https : //www.timeanddate.com/time/time-zones-interesting.html

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://developers.docusign.com/docs/esign-soap-api/esign101/timezone-date-format/ (Current) https://www.docusign.com/p/APIGuide/Content/Introduction+Changes/Appendix-Time%20Zone.htm (original, outdated) https://developers.docusign.com/docs/esign-soap-api/esign101/timezone-date-format/ (当前) 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. REST API :从 REST API 获取信息时,所有非 PDF 时区响应都以 ISO 8601 日期/时间格式返回,使用 GMT 作为时区。 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.通过 REST API 检索的 PDF 项目(例如完成证书或带有日期标签的文档)使用先前描述的完成证书和 PDF 文档设置。

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. SOAP API :从 SOAP API 获取信息时,所有非 PDF 项目都使用由用于 API 的时区选项设置的时区。 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.通过 SOAP API 检索的 PDF 项目(例如完成证书或带有日期标签的文档)使用先前描述的完成证书和 PDF 文档设置。

Date/Time Formats for API Calls All DocuSign SOAP and REST API requests must use ISO 8601 date/time formats. API 调用的日期/时间格式所有 DocuSign SOAP 和 REST API 请求都必须使用 ISO 8601 日期/时间格式。 The REST API assumes that all values passed represent UTC date/times. REST API 假定传递的所有值都表示 UTC 日期/时间。

When providing a date/time format for the DocuSign REST API, the preferred formats are:为 DocuSign REST API 提供日期/时间格式时,首选格式为:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM