APIs & Integrations

JustinPeters
Member

API timestamp error for date properties

SOLVE

Hi,

We are trying to create a deal through API's. We get the information from Harvest.

When we create a new deal we need to add a date property, but this wont work. We keep getting this error:

INVALID_DATE [fee_proposal_sent_date] => 1542240000 is at 20:24:0.0 UTC, not midnight!

But according to this website: https://www.epochconverter.com/timezones?q=1542240000&tz=UTC
It actually is at midnight...

We do not even need the timestamp, we just need the date properties.

Update: Added Miliseconds and now it works.

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

API timestamp error for date properties

SOLVE

Welcome, @JustinPeters!

Apologies for the delayed response. I'm glad that you were able to find the solution on your own!

For others viewing this topic, this documentation goes into a little more detail on the timestamp format HubSpot APIs accept.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
1 Reply 1
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

API timestamp error for date properties

SOLVE

Welcome, @JustinPeters!

Apologies for the delayed response. I'm glad that you were able to find the solution on your own!

For others viewing this topic, this documentation goes into a little more detail on the timestamp format HubSpot APIs accept.

Isaac Takushi

Associate Certification Manager
0 Upvotes