Skip to main content
Level 2
Sep 16, 2022 5:25 AM UTC
Solved

DateTime discrepancy between Marketo and REST API

I am extracting marketo activities using bulk extract API and found out that not all of my activities were being extracted. Upon further investigation I found out that there is a discrepancy between Marketo Activity Log DateTime filed vs what I get from "....bulk/v1/activities/export/..." endpoint. 

Please see the below screenshots. In marketo, I have a Date/Time August 31, 2022 8:48 PM, but when I extract the Activities using bulk extract API endpoint I get September 01, 2022 3:48 PM. 

I also checked my time zone on my marketo admin and it is set as: 

(GMT-07:00) Mountain Standard Time (America/Phoenix) (MST).

This is the filter I am using on my Bulk Extract API Call:

   "filter": {
      "createdAt": {
         "startAt": "2022-08-01T00:00:00Z",
         "endAt": "2022-09-01T00:00:00Z"
      }
   }
How do I resolve this? Any help would be highly appreciated.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Sep 16, 2022 5:43 AM UTC

... but when I extract the Activities using bulk extract API endpoint I get September 01, 2022 3:48 PM. 

No, you get

2022-09-01T03:48:29Z

which is

Aug 31 2022 23:48:29 GMT-0400

or

Aug 31 2022 20:48:29 GMT-0700

or

Aug 31 2022 8:48:29 PM GMT-0700

 

In other words, the same time.

4 replies

SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Sep 16, 2022 5:43 AM UTC

... but when I extract the Activities using bulk extract API endpoint I get September 01, 2022 3:48 PM. 

No, you get

2022-09-01T03:48:29Z

which is

Aug 31 2022 23:48:29 GMT-0400

or

Aug 31 2022 20:48:29 GMT-0700

or

Aug 31 2022 8:48:29 PM GMT-0700

 

In other words, the same time.

Translate
Katja_Keesom
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Sep 16, 2022 6:03 AM UTC

It is exactly as Sanford says, it all indicates exactly the same. In the database, all timestamps are stored in a unified format and your personal profile settings dictate how it is translated to the time zone you are in.

And if I am not mistaken I actually see in your screenshot the answer to your other question. I am quite confident the four digit codes you are showing there are your form ids (2540 and 1774 respectively).

Translate
Level 2
Sep 16, 2022 2:20 PM UTC

@sanfordwhiteman  and @katja_keesom  what should I do to make my API return the same datetime zone which I see in Marketo? I want my API call to return 2022-08-31T08:48:29Z instead of 2022-09-01T03:48:29Z.

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Sep 16, 2022 4:16 PM UTC
It is the same time! Z means UTC. Your instance time zone is not UTC.

Sounds like you'd benefit from some side reading about time zones and offsets. Datetimes are always stored as UTC times. You decide how to display times on the client side.
Translate