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?
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/
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?
Hmm, I would need to see what happened in the activity log. Some questions I have:
Without more information I'm afraid I cannot give you any definitive answers.
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.
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.
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.
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?
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.