---
schema_version: "1"
id: 8f864ceb206b81b671ee5f7aed4db24f8191cbd52d1915058d8aa6df42140cce
title: Get DATETIME Values in the Right Time Zone
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/einstein-vision-language/einstein/guides/Detect-Entities-in-Text/get-datetime-values-in-the-right-time-zone.md
canonical_url: https://developer.salesforce.com/docs/analytics/einstein-vision-language/guide/get-datetime-values-in-the-right-time-zone.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d61d43068fb0b272735af0e270c05e159eefa903ecd2c73d871a799e9dd21170
products:
  - Einstein Vision and Language
  - Einstein Vision and Language Repo
---

# Get DATETIME Values in the Right Time Zone

When you call the Einstein NER (beta) endpoint and pass the `timezone` parameter, that parameter value takes precedence, and any DATETIME entities returned by the API are converted into that time zone. If you omit the `timezone` parameter, the DATETIME entity is normalized based on the `language` parameter value.

This table contains the time zones associated with each language.

| Language              | Language code | Time zone           |
| --------------------- | ------------- | ------------------- |
| Brazilian Portuguese  | `pt_BR`       | America/Sao Paulo   |
| Chinese (Simplified)  | `zh_CN`       | Asia/Shanghai       |
| Chinese (Traditional) | `zh_TW`       | Asia/Taipei         |
| Danish                | `da`          | Europe/Copenhagen   |
| Dutch                 | `nl_NL`       | Europe/Amsterdam    |
| English UK            | `en_GB`       | Europe/London       |
| English US            | `en_US`       | America/Los Angeles |
| French                | `fr`          | Europe/Paris        |
| German                | `de`          | Europe/Berlin       |
| Italian               | `it`          | Europe/Rome         |
| Japanese              | `ja`          | Asia/Tokyo          |
| Korean                | `ko`          | Asia/Tokyo          |
| Portuguese            | `pt_PT`       | Europe/Lisbon       |
| Russian               | `ru`          | Europe/Moscow       |
| Spanish               | `es`          | Europe/Madrid       |
| Swedish               | `sv`          | Europe/Stockholm    |

If you specify a language but want to return the DATETIME entities in a different time zone, then you must pass the `timezone` parameter. For example, if you specify a language of English US, but you want to return DATETIME entities in the Eastern time zone, pass the `timezone` parameter with a value of America/New_York. To specify the time zone, see this list of [tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for valid time zones, and use the TZ database name value from the table. For example, `Africa/Abidjan`.

## Examples

### Specify Only a Time Zone

Let’s say the current time is 1:00 pm (13:00) in the America/Los Angeles time zone. The following cURL call and the JSON response show the response if you pass a `timezone` parameter of Europe/London.

```cURL
curl -X POST -H "Authorization: Bearer <TOKEN>"
-H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data"
-F "timezone=Europe/London" -F "document=The meeting starts in two hours."
https://api.einstein.ai/v2/language/entities
```

```json
{
    "probabilities": [
        {
            "probability": 0.99119055,
            "label": "DATETIME",
            "token": "in two hours",
            "span": {
                "start": 19,
                "end": 31
            },
            "normalizedData": [
                {
                    "value": "2021-04-14T23:00:00.000+01:00",
                    "unit": "minute",
                    "type": "value"
                }
            ]
        }
    ],
    "object": "predictresponse"
}
```

### Specify Only a Language

If you omit the `timezone` parameter, the DATETIME entity is normalized based on the `language` parameter value. Here's what the call and response looks like if you pass a language value of `en_GB`.

```cURL
curl -X POST -H "Authorization: Bearer <TOKEN>"
-H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data"
-F "language=en_GB" -F "document=The meeting starts in two hours."
https://api.einstein.ai/v2/language/entities
```

```json
{
    "probabilities": [
        {
            "probability": 0.99119055,
            "label": "DATETIME",
            "token": "in two hours",
            "span": {
                "start": 19,
                "end": 31
            },
            "normalizedData": [
                {
                    "value": "2021-04-14T23:00:00.000+01:00",
                    "unit": "minute",
                    "type": "value"
                }
            ]
        }
    ],
    "object": "predictresponse"
}
```

Here's what the call and response looks like if you pass a value of `en_US`. The time zone associated with `en_US` is America/Los Angeles.

```cURL
curl -X POST -H "Authorization: Bearer <TOKEN>"
-H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data"
-F "language=en_US" -F "document=The meeting starts in two hours."
https://api.einstein.ai/v2/language/entities
```

```json
{
    "probabilities": [
        {
            "probability": 0.99119055,
            "label": "DATETIME",
            "token": "in two hours",
            "span": {
                "start": 19,
                "end": 31
            },
            "normalizedData": [
                {
                    "value": "2021-04-14T15:00:00.000-07:00",
                    "unit": "minute",
                    "type": "value"
                }
            ]
        }
    ],
    "object": "predictresponse"
}
```

### Omit Language and Time Zone

If you omit the `language` parameter, the default language is `en_US`, and the DATETIME value is converted to the America/Los Angeles time zone.

```cURL
curl -X POST -H "Authorization: Bearer <TOKEN>"
-H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data"
-F "document=The meeting starts in two hours."
https://api.einstein.ai/v2/language/entities
```

```json
{
    "probabilities": [
        {
            "probability": 0.99119055,
            "label": "DATETIME",
            "token": "in two hours",
            "span": {
                "start": 19,
                "end": 31
            },
            "normalizedData": [
                {
                    "value": "2021-04-14T15:00:00.000-07:00",
                    "unit": "minute",
                    "type": "value"
                }
            ]
        }
    ],
    "object": "predictresponse"
}
```
