5

When making an API call to SendEvent or OpenEvent objects in the REST API, the return value is in Central time. How do I know what timezone it is using for the dates that I pass as arguments?

If I pass time strings with or without timezone specified or with different timezones specified each call, it returns the same values. For example, if I ask for events between the dates of
2015-12-19 15:00:00-06:00 and 2015-12-19 16:00:00-06:00
vs. between
2015-12-19 15:00:00+00:00 and 2015-12-19 16:00:00+00:00
(notice these are the same except for the timezones specified), it gives me events whose timestamps are between
2015-12-19 14:00:00 and 2015-12-19 15:00:00
(notice those are an hour off from the dates specified, and no timezone included). This could be because I'm in an EST timezone so it uses EST as the timezone for the dates I pass in, because CST is an hour off from EST. But I'm not specifying EST (and in fact I'm specifying a different timezone), and I can't assume the API will always parse my arguments as being in EST since the calls could be made from a server somewhere else that's not in EST.

5
  • Is this a custom Rest endpoint or the standard salesforce update subject endpoint? If custom, it will depend on the code and the users timezone. It has nothing to do with the location you are physically making the call from.
    – Eric
    Commented Dec 21, 2015 at 23:14
  • I'm not sure what you mean by custom endpoints vs. standard. The objects I am trying to retrieve are documented well (help.exacttarget.com/en-US/technical_library/web_service_guide/… and help.exacttarget.com/en-US/technical_library/web_service_guide/…) and they are provided in the Python library FuelSDK. Does that answer your question?
    – tscizzle
    Commented Dec 22, 2015 at 0:57
  • Sorry that I did not get that it was Exact Target you were speaking of since it was nowhere in your question or in your tags.......
    – Eric
    Commented Dec 22, 2015 at 1:03
  • Apologies. Edited to have marketing-cloud tag.
    – tscizzle
    Commented Dec 22, 2015 at 1:04
  • 1
    What REST route are you using to retrieve SentEvent and OpenEvent objects? It is possible with SOAP. When using SOAP, the filter has to be specified using the DateValue property on the FilterPart. It is possible to pass a string value in using the Value property on FilterPart but isn't recommended since it may parse the date incorrectly. The DateValue property is type xsd:date so will always accept a value in the format: 2013-08-01T01:00:00.000-05:00. If using the DateValue property, it will always used the timezone provided unless it isn't specified in which cases is defaults to GMT.
    – Mac
    Commented Dec 30, 2015 at 19:16

0

You must log in to answer this question.

Browse other questions tagged .