Timezone to import lead in Marketo account CEST

Jayant_Singh
Level 3

Timezone to import lead in Marketo account CEST

Marketo custom field opt-in date is sent to internal system database as "optinDate" :"2020-11-28 00:24:20", and while exporting lead from Marketo.

Next day, same date is sent to Marketo again via internal system DB "optinDate" :"2020-11-28 00:24:20",via API in this format YYYY-MM-DD hh:mm:ss.0000000 this format but due to that opt-in date is changed with below reason mentioned in Marketo. Our Marketo account timezone is in CEST. Hence, what should be exact format so that optinDate should not change while lead import through API. Can anyone suggest on this issue?

 
 

tz.JPG

 

Jayant
7 REPLIES 7
Katja_Keesom
Level 10 - Community Advisor + Adobe Champion

Re: Timezone to import lead in Marketo account CEST

Hi Jayant,

 

First of all, I think your screenshot is not related to the actual activity your question is about. This screenshot shows the datetime zone being adjusted, not the optin datetime. Importing and exporting datetime fields can be a bit tricky, as you need to align the interpretation of the value based on timezones. The best way to avoid this is to include the reference to "zulu time" (GMT) in your API message. For more info please see the  fieldtype explanation here: https://developers.marketo.com/rest-api/lead-database/fields/field-types/

Jayant_Singh
Level 3

Re: Timezone to import lead in Marketo account CEST

I am facing datetime zone being adjusted this is the main pain point. For different country the person timezone is being adjusted when we are doing lead import via API. how can this be fixed in this case?

Jayant
Katja_Keesom
Level 10 - Community Advisor + Adobe Champion

Re: Timezone to import lead in Marketo account CEST

Hmm, I would need to see what happened in the activity log. Some questions I have:

  • I see in your screenshot a reference to a smart campaign that updated the time zone? In the activity log you should be able to see a hyperlink to that smart campaign to find out what it does exactly.
  • Is the optin datetime synced correctly via the API and then updated in Marketo to the incorrect value or is it received with the incorrect value straight from the API?

Without more information I'm afraid I cannot give you any definitive answers.

Jayant_Singh
Level 3

Re: Timezone to import lead in Marketo account CEST

I have checked the hyperlink of smart campaign and it is not found in any of the active workspace and this link redirect to same activity log again.

Jayant_Singh_0-1608643640608.png

Through API sending correct datetime but it is not updating that one and at the same time calculate timezone campaign is running to adjust the person timezone based on country and city but no such campaign is configured in our workspace. I believe this is Marketo backend activity but not sure how to get it correct.

Jayant
SanfordWhiteman
Level 10 - Community Moderator

Re: Timezone to import lead in Marketo account CEST

The system Person Timezone field is calculated automatically from location. You can't manually change it.

 

But Person Timezone is not related to the timezone of the instance.

Jayant_Singh
Level 3

Re: Timezone to import lead in Marketo account CEST

In my case, when Marketo calculate Person Timezone automatically   it is affecting the datetime field like Marketo acquisition  date and optin date field details. How can this be sure it does not adjust the person timezone. is there any alternate approach for this?

Jayant
SanfordWhiteman
Level 10 - Community Moderator

Re: Timezone to import lead in Marketo account CEST

Again, you are mistaken about how Person Time Zone works.

 

Changes to Person Time Zone do not change the UTC value stored in the database. It would be catastrophic if this were how PTZ worked.

 

If you write the same UTC datetime to 2 leads with different PTZ values, the stored values are exactly the same. If one of those leads later has a PTZ change (to yet a 3rd PTZ), the stored datetimes are still exactly the same.