Foo L
Foo L

Reputation: 11137

Docusign webhook callback TimeZoneOffset

I'm using Docusign's webhook event notification to get info about my envelopes. I'm getting XML back from the service, but I'm trying to convert some the timestamps in the XML payload to UTC. The XML payload includes a TimeZoneOffset as an element, i.e.:

<DocuSignEnvelopeInformation>
  ...
  <TimeZoneOffset>-7</TimeZoneOffset>
</DocuSignEnvelopeInformation>

What happens if the offset is UTC? Is it just 0 or +0 or -0? Could it ever be something like +1030? Do positive values have + prepended?

How is this field determined anyway? Is it the last sender's timezone offset?

Upvotes: 0

Views: 233

Answers (1)

Rickey S
Rickey S

Reputation: 1244

It is the account wide (or users) timezone. For example, I am in AEST which is UTC+10 and my XML comes through with:

<TimeZone>AUS Eastern Standard Time</TimeZone>
<TimeZoneOffset>10</TimeZoneOffset>

In Preferences --> Features if I change my API timezone to Pacific Time (US) then my offset changes to:

<TimeZone>Pacific Standard Time</TimeZone>
<TimeZoneOffset>-7</TimeZoneOffset>

It's based on UTC and the offset will be 'x' for UTC or ahead and '-x' for behind.

Upvotes: 3

Related Questions