APIs & Integrations

MakeDevelopment
Participant

Some dates in the API response (v3) are 1970-01-01T00:00:00Z

SOLVE

When getting Blog Posts, Landing Pages and Site Pages some dates with presumably empty value are replaced with 1970-01-01T00:00:00Z

For example /cms/v3/pages/landing-pages

"deletedAt": "1970-01-01T00:00:00Z"

"publishDate": "1970-01-01T00:00:00Z",

I've created these pages via UI (not API) and they are not deleted nor published yet, so these dates should be empty.

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Some dates in the API response (v3) are 1970-01-01T00:00:00Z

SOLVE

Hi @MakeDevelopment ,

 

1970-01-01T00:00:00Z is the default value of any DateTime field, so instead of being empty, it will show 1970-01-01T00:00:00Z if no value is set.

This is expected behavior, but you can easily filter by checking if the value is not 1970-01-01T00:00:00Z



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

0 Upvotes
1 Reply 1
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Some dates in the API response (v3) are 1970-01-01T00:00:00Z

SOLVE

Hi @MakeDevelopment ,

 

1970-01-01T00:00:00Z is the default value of any DateTime field, so instead of being empty, it will show 1970-01-01T00:00:00Z if no value is set.

This is expected behavior, but you can easily filter by checking if the value is not 1970-01-01T00:00:00Z



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes