SOLVED

DateTime discrepancy between Marketo and REST API

Go to solution
MuhammadFaisal1
Level 1

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

Marketo Activity Log.png

Marketo REST API Result.png

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.
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: DateTime discrepancy between Marketo and REST API


... 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.

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: DateTime discrepancy between Marketo and REST API


... 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.

Katja_Keesom
Level 10 - Community Advisor + Adobe Champion

Re: DateTime discrepancy between Marketo and REST API

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).

MuhammadFaisal1
Level 1

Re: DateTime discrepancy between Marketo and REST API

@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.

SanfordWhiteman
Level 10 - Community Moderator

Re: DateTime discrepancy between Marketo and REST API

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.