DateTime discrepancy between Marketo and REST API | Community
Skip to main content
New Participant
September 16, 2022
Solved

DateTime discrepancy between Marketo and REST API

  • September 16, 2022
  • 3 replies
  • 2269 views

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.
Best answer by SanfordWhiteman

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

3 replies

New Participant
September 16, 2022

@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
New Participant
September 16, 2022
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.
Katja_Keesom
Community Manager
September 16, 2022

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

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
September 16, 2022

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