Time zone settings not reflected via api

Anonymous
Not applicable

Time zone settings not reflected via api

I have modified the time zone to IST (+5:30) at two places as suggested in the help articles.
1. Admin -> Location -> Time Zone
2. User -> My account -> Location -> Time Zone

But when I invoke the getMObjects API on opportunity, I'm getting the time zone for externalCreatedDate as EST(-05:00)  instead of IST(+05:30).

<attrib>
          <name>ExternalCreatedDate</name>
          <value>2013-10-25T07:45:44-05:00</value>
</attrib>

How can I get the time zone for datetime fields returned in API same as the time zone set in the portal?
Tags (1)
4 REPLIES 4
Anonymous
Not applicable

Re: Time zone settings not reflected via api

To the best of my knowlwdge the API does not offset the timestamps.

That would be an interesting reqeust to post to "Ideas".

Anonymous
Not applicable

Re: Time zone settings not reflected via api

Thanks for the quick reply.

Actually there are some fields where the timestamp is offset with timezone.
For e.g., with activityRecord API

<ns1:successGetLeadActivity>
<leadActivityList>
<returnCount>2</returnCount>
<remainingCount>1</remainingCount>
<newStartPosition>
<latestCreatedAt>2013-07-31T21:33:59-05:00</latestCreatedAt>
<oldestCreatedAt xsi:nil="true" />
<activityCreatedAt xsi:nil="true" />
<offset>ID:1024814</offset>
</newStartPosition>
<activityRecordList>
<activityRecord>
<id>1030680</id>
<activityDateTime>2013-07-09T16:44:28-05:00</activityDateTime>
<activityType>Visit Webpage</activityType>
<mktgAssetName>ClickDemo</mktgAssetName>
<activityAttributes>
<attribute>
<attrName>Webpage ID</attrName>
<attrType xsi:nil="true" />
<attrValue>2547</attrValue>
</attribute>
<attribute>
<attrName>Webpage URL</attrName>
<attrType xsi:nil="true" />
<attrValue>/ClickDemo.html</attrValue>
</attribute>
<attribute>
<attrName>Query Parameters</attrName>
<attrType xsi:nil="true" />
<attrValue>aliId=26419</attrValue>
</attribute>
<attribute>
<attrName>Referrer URL</attrName>
<attrType xsi:nil="true" />
<attrValue>http://localhost/~tkaufman/index.php</attrValue>
</attribute>
<attribute>
<attrName>Client IP Address</attrName>
<attrType xsi:nil="true" />
<attrValue>12.234.36.130</attrValue>
</attribute>
<attribute>
<attrName>User Agent</attrName>
<attrType xsi:nil="true" />
<attrValue>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/536.28.10 (KHTML, like Gecko) Version/6.0.3 Safari/536.28.10</attrValue>
</attribute>
<attribute>
<attrName>Message Id</attrName>
<attrType xsi:nil="true" />
<attrValue>44490</attrValue>
</attribute>
<attribute>
<attrName>Created At</attrName>
<attrType xsi:nil="true" />
<attrValue>2013-07-09 16:44:28</attrValue>
</attribute>
<attribute>
<attrName>Lead ID</attrName>
<attrType xsi:nil="true" />
<attrValue>1089965</attrValue>
</attribute>
</activityAttributes>
<campaign />
<personName xsi:nil="true" />
<mktPersonId>1089965</mktPersonId>
<foreignSysId xsi:nil="true" />
<orgName xsi:nil="true" />
<foreignSysOrgId xsi:nil="true" />
</activityRecord>
</activityRecordList>
</leadActivityList>
</ns1:successGetLeadActivity>


Will they always be offset with -05:00 ?
Anonymous
Not applicable

Re: Time zone settings not reflected via api

<latestCreatedAt>2013-07-31T21:33:59-05:00</latestCreatedAt> reflects the server time.
It is set to US time zones.

If it was offsetting the timestamp would be 21:33:59+10:30, where 5:30 are ahead of GMT plus 5:00 behind.

Anonymous
Not applicable

Re: Time zone settings not reflected via api

Ah! Now I get it.

One more question, I've seen -05:00 returned for activityRecord, multipleleads and getMobjects which you were referring as the server time.

But only with describeMobject API, the time zone for field "updatedAt" returned is  +00:00.  In fact the example given for describeMObject (http://developers.marketo.com/documentation/soap/describemobject/) also shows the timezone for "updatedAt" as +00:00. Is this time zone something different from the server time? I observe this is only with describeMObjects.