APIs & Integrations

Fivetran
Participant

Getting negative timestamp in API Response

SOLVE

We're getting negative timestamp in the metadata object from engagements API endpoint (https://api.hubapi.com/engagements/v1/engagements/paged?count=100&limit=250).

What do these negative numbers mean?

     "metadata": {
        "startTime": -61566219300000,
        "endTime": -61566213900000,
        "title": "Demo",
        "preMeetingProspectReminders": []
      }
0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Getting negative timestamp in API Response

SOLVE

Hi @FivetranDevelopers,

As Derek notes in this topic, negative epoch timestamps denote dates before 1970. In milliseconds, -61566219300000 corresponds with January 16, 0019 at 7:28 PM, but in seconds, it matches January 19, 1968 at 5:16 AM, which makes much more sense. Make sure that all UNIX timestamps are formatted in milliseconds, per this documentation.

That said, which portal are you querying? I see there are several accounts associated with fivetran.com.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
1 Reply 1
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Getting negative timestamp in API Response

SOLVE

Hi @FivetranDevelopers,

As Derek notes in this topic, negative epoch timestamps denote dates before 1970. In milliseconds, -61566219300000 corresponds with January 16, 0019 at 7:28 PM, but in seconds, it matches January 19, 1968 at 5:16 AM, which makes much more sense. Make sure that all UNIX timestamps are formatted in milliseconds, per this documentation.

That said, which portal are you querying? I see there are several accounts associated with fivetran.com.

Isaac Takushi

Associate Certification Manager
0 Upvotes