Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent date type on OfflineConversion->ConversionTime #167

Open
neildaniels opened this issue Jul 12, 2022 · 1 comment
Open

Inconsistent date type on OfflineConversion->ConversionTime #167

neildaniels opened this issue Jul 12, 2022 · 1 comment

Comments

@neildaniels
Copy link

The comment on OfflineConversion->ConversionTime indicates that the type should be a DateTime object.

/**
* The date and time when the offline conversion occurred.
* @var \DateTime
*/
public $ConversionTime;

But the sample code implies that it should/can merely be a timestamp like 1657665961.

// The date and time must be in UTC, should align to the date and time of the
// recorded click (MicrosoftClickId), and cannot be in the future.
$offlineConversion->ConversionTime = $_SERVER['REQUEST_TIME'];

Is there a definitive type this should be?

@eugeene
Copy link

eugeene commented Jan 17, 2023

Hi there. For those whom might get into similar situation:

I was getting cryptic WSDL errors (The string '' is not a valid AllXsd value) due to this 'inconsistency'. The \DateTime typehint is wrong. Use string representation of your date(time).

I used $offlineConversion->ConversionTime = $dateTimeObject->format('c');

This seems to be working. The whole SDK library/documentation/examples is not the greatest in the world. The online customer service is slow and not helpful at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants