APIs & Integrations


API Timestamps and Timezones

In the docs How should timestamps be formatted for HubSpot’s APIs? there’s an example of a timestamp 1427997766000 of an EST time. But in the documentation above it says “HubSpot stores the timestamps internally as UTC time”.

It then says time in the “portal will be displayed based on the Time Zone settings in the Reports > Reports Settings”.

What is the “portal”? Is the portal apps.hubspot.com? Will api.hubspot.com always return UTC timestamps? Or will timestamps from api.hubspot.com be dependent upon the Timezone settings from apps.hubspot.com?

1 Reply 1
HubSpot Alumni
HubSpot Alumni

API Timestamps and Timezones

Hi @tomdev,

The example in the doc you referenced is illustrating the millisecond timestamp format. A timestamp value represents a specific time in UTC, which can be converted to other timezones. The example in the document (1427997766000) represents 02 Apr 2015 18:02:46 UTC, which converts to April 2nd, 2015, 2:02:46 PM EDT. Date properties are stored as UTC timestamp values in HubSpot, and displayed in-app based on the Time Zone settings in the Reports > Reports Settings. A portal is your HubSpot account, and UTC timestamps will always be returned via the API.