Utilizing time zone offset to shift the dates & times of API results

When using LiveAgent, the dates and times displayed in the panel are automatically recalculated according to the user's PC time zone. However, API v3 returns data according to the time zone of your LiveAgent account. This can lead to discrepancies when, for example, searching for tickets in the panel and retrieving ticket lists via API. To align the dates and times with your preferred timezone, you need to add a Timezone-Offset header to your API calls. This will adjust the time of the retrieved records.

Accounts created approximately in the first half of 2019 or earlier typically have the time zone set to America/Phoenix (UTC -7). Accounts created after this period have the time zone set to UTC.

To check the time zone of your account, use API v3 GET /settings.

The filter in our API v3 operates with dates & times in UTC. For example, if your account is in the America/Phoenix time zone, using a filter to retrieve a list of tickets created from 1.1.2026 00:00:00 would actually return tickets created from 31.12.2025 17:00:00 due to the 7-hour difference.

To adjust the time, add the Timezone-Offset header to your API calls with a value in seconds that represents the desired time shift. Applying the header itself already shifts the times to the UTC time zone. To further adjust the time, set the value of the header only to match the difference between UTC and your local time zone. For example:

  • If your account time zone is America/Phoenix and your local time zone is UTC, to shift the time in API results to UTC, set the Timezone-Offset value to 0.
  • If your account time zone is America/Phoenix and your local time zone is UTC +1 (e.g. CET), to shift the time in API results to your time zone, set the Timezone-Offset value to 3600.
  • If your account time zone is UTC and your local time zone is also UTC, you do not need to use the Timezone-Offset header.
  • If your account time zone is UTC and your local time zone is UTC +2 (e.g. CEST), to shift the time in API results to your time zone, set the Timezone-Offset value to 7200.

On the example screenshots below, note that applying an API filter _filters=[["date_created","D>","2026-01-19 15:00:00"]] to retrieve a list of tickets created on 19.1. 15:00:00 or later retrieves also a ticket created at 08:29:48. This is because the account's time zone is America/Phoenix. The filter applies UTC time, but the ticket's creation date was saved to database in UTC -7. Recalculating the ticket's creation date from UTC -7 to UTC results in 15:29:48, and therefore the filter's condition is met, and the ticket is retrieved by the API call.

To shift the time of the ticket in the retrieved result to UTC to match the filter's searching behavior, add a Timezone-Offset=0 header to your API call.

If your PC/local time zone is different from UTC and you'd like the API results to match times in the panel, adjust the value of the header as needed. Please remember that the filter will still operate in UTC.

×