Scheduling time through API usually wrong | Community
Skip to main content
July 6, 2017
Question

Scheduling time through API usually wrong

  • July 6, 2017
  • 3 replies
  • 3323 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Gerard_Donnell4
Level 9
July 6, 2017

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

SanfordWhiteman
Level 10
July 6, 2017

Use ISO8601 UTC.

     2017-07-05T13:00:00Z

July 6, 2017

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;

SanfordWhiteman
Level 10
July 6, 2017

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.

Kenny_Elkington
Adobe Employee
Adobe Employee
July 6, 2017

We're preparing a fix for this in the upcoming minor release, currently scheduled for the last week of July.

August 30, 2017

Hi Kenny,

Any update on this ? Has Issue been fixed in upcoming minor release.