Question

API Response Time Zone

  • 10 April 2023
  • 3 replies
  • 30 views

Badge +7

Hello

How could i change the Time zone on the response api?

 

I execute the https://xxxxxxx/v2/activity/list , but response in a diference time zone.

 

CR V26 Onpremise

 

 


3 replies

Userlevel 5
Badge +10

Hi @GOAA ,

Whether your CR and API response time zone is same ?

Configuring the time zone this is related to the A11. i hope same kind of steps available to A360 as well. Kindly check with AA Support team.

 

 

Userlevel 5
Badge +9

@GOAA 

The retrieved data will be in UTC format.  Im’ not sure if exist any parameter to change the time zone from the result. 

 

Example: The following .json will get the historical records, from 2022-10-14 17:00:00  to 202210-14 18:01:00 

 

{

  "sort": [

    {

      "field": "startDateTime",

      "direction": "desc"

    }

  ],

  "filter": {

    "operator": "and",

    "operands": [

      {

        "operator": "gt",

        "field": "startDateTime",

        "value": "2022-10-14T17:00:00.001Z"

      },

      {

        "operator": "lt",

        "field": "endDateTime",

        "value": "2022-10-14T18:01:00.000Z"

      }

    ]

  },

  "fields": [],

  "page": {

    "length": "1000",

    "offset": "0"

  }

}

 

Regards

Userlevel 5
Badge +10

@GOAA 

There is no automatic way. You need a mechanism to get the user's timezone (e.g. using some API) and then convert the date-time to that timezone. Check How to convert date time from one time zone to another time zone for the second part. 

Reply