0 Replies Latest reply on Dec 19, 2016 4:36 AM by 659adba42ac178da12162870edf8938bf8d0890e

    Setting Email Program startDate and Approve

      Hello. Looking for help with api call to set email program start date and approve for sending.

       

      All api calls working just fine, but startDate is always 2 hours ahead of expected.

       

      $dateTime = new \DateTime();

      //15 minutes in future

      $dateTime->add ( new \DateInterval ( "PT15M" ) );

      $minute = $dateTime->format ( "i" );

       

      //round date next 15 - required by api

      $minute = $minute % 15;

      $diff = 15 - $minute;

      $dateTime->add ( new \DateInterval ( "PT" . $diff . "M" ) );

                 

      $apiURL = 'asset/v1/program/' . $clonedProgram->id . '.json?access_token=' . $this->getAccessToken ( );

      $formParams = [

                          'form_params' => [

                                  'startDate' => $dateTime->format(DATE_ISO8601),

                          ]

      ];

      $response = $client->post ( $apiURL, $formParams );

       

      This api call return success then I do approve which is also return success.

       

      Then in marketo UI I see

      Approved: Dec 19, 2016 4:28 AM PST

      Send date: Dec 19, 2016 6:45 AM PST

       

      It works same whenever I use DATE_ISO8601 or DATE_W3C, if I set any timezone to this date time object etc.

       

      Anyone know what is wrong?