# Wrong time in created cases in Bitrix24

### Wrong time in created cases in Bitrix24

If you encounter incorrect timestamps in the created cases, you should consistently verify the following settings.

### Time zone in the application settings

Check the `app.time_zone` option in the config file at `/etc/itgrix_bx/config.json`. Normally, this option is not present, but it can be added if your system's time zone is different from one that you prefer. Any time zone that is recognized by your system is acceptable, for example `"+05"`, `"Asia/Almaty"`, etc.

### Time settings on Bitrix24 server (for self-hosted version only)

{% hint style="info" %}
Skip this step if you have a cloud-based Bitrix24.
{% endhint %}

If you have a self-hosted version of Bitrix24, connect to the server with Bitrix24 and run the command:

`$ date`

Check that the time and time zone are correct in the response.

#### Employee time settings in Bitrix24

Check that the correct time zone is specified in the profile of the user on whose behalf you are viewing cases: User profile > Change personal data > Automatically determine time zone. Ensure that the clock at the top of portal pages shows the correct time.

The same should be checked for the user on whose behalf the application connects to the portal. You can re-authenticate the app from the admin panel to set that user as your currently logged in user.

#### Time settings on Asterisk server (timestamps in the CEL table)

Run this command on the Asterisk server:

`$ date`

Check that the time and time zone are correct in the response.

Verify that the timestamps in the CEL table are correct:

`$ mysql -u root`\
`> USE asteriskcdrdb;`\
`> SELECT * FROM cel ORDER BY eventtime DESC LIMIT 1;`

Check the value of the **eventtime** field for the latest entry. If you have active telephony users, the time should be approximately same as the current time.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.itgrix.com/for-admins/wrong-time-in-created-cases-in-bitrix24.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
