We are scheduling digest in marketo through API in PHP language the selected schedule time by an admin, but
in marketo campaign schedule it is updated incorrected date.
eg. = We are sending date time from my system 05-07-2017 1:00 PM but updated campaign schedule time in marketo July 5, 2017 6:00 AM showing incorrected
it should show July 5, 2017 1:00 PM. how can we resolve the issue.
Hi Dhirendra Kumar,
Have you checked to see if this is the difference between your system time and the time that Marketo is setup for either in the Marketo System or the User Profile?
Marketo System Time
Marketo User Time
Use ISO8601 UTC.
2017-07-05T13:00:00Z
Hi Sanford,
Thanks for the reply
I am sending date time from my system 06-07-2017 8:00 PM by using above format provided by you but still no luck
incorrected campaign schedule time is updated Jul 6, 2017 1:00 PM it should be Jul 6, 2017 8:00 PM. please see attached screenshot.
Below I am using the script for sending date time.
$dtzObj = new \DateTimeZone("Asia/Kolkata");
$dateTime = new DrupalDateTime($time, $dtzObj);
$formatted = $dateTime->format(DATE_ISO8601);
$dateformatted = substr($formatted, 0, -6).'.000Z';
$body->input->runAt = $dateformatted;
I'd need to see the final ISO8601 date you're sending to Marketo after that string mangling (generally speaking if I see substr() run on date output that's a bad sign -- your date library must be capable of outputting in the date and time zone you desire, without further postprocessing).
You shouldn't be sending ISO8601 milliseconds.
The final date is 2017-07-06T23:00:0.000Z which is sending to marketo for campaign schedule and selected date from my system is 06-07-2017 11:00 P.M.
We're preparing a fix for this in the upcoming minor release, currently scheduled for the last week of July.
Hi Kenny,
Any update on this ? Has Issue been fixed in upcoming minor release.