---
schema_version: "1"
id: 91cd5e4531b1169d0189aa08db14dcc46a0cdd2834724748b273b9747c43bc83
title: Convert Time Zone
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/field-service-dev/guides/field-service/source-files/actions/actions-obj-converttimezone.md
canonical_url: https://developer.salesforce.com/docs/service/field-service-dev/guide/actions-obj-converttimezone.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a89bbd85c3b0c2ef551c67d1384f3415ca2005b084021bfe1a9090916f54f75d
products:
  - Field Service Developer Guide
  - Service Cloud Developer Content
---

# Convert Time Zone

Converts the time from the current time zone to the requested time zone. If the time doesn’t contain a time zone, the value defined in Input Time Zone is used instead.

This action is available in API version 62.0 and later.

## Supported REST HTTP Methods

**URI:** `/services/data/vXX.X/actions/standard/convertTimeZone`

Where `XX.X` is the latest API version.

**Formats:** JSON, XML

**HTTP Methods:** POST

**Authentication:** `Authorization: Bearer TOKEN`

Where `TOKEN` is a variable.

## Inputs

|Input|Type|Description|
|-----|----|-----------|
|`time`|string|Required. The time that requires conversion. It can be with or without a time zone. The format for times that include a time zone is `yyyy-MM-dd'T'HH:mm:ss.SSSXXX`. For example, `2025-02-24T14:30:15.123-05:00`. The format for times that don’t include a time zone is `yyyy-MM-dd'T'HH:mm:ss.SSS`. For example, `2025-02-24T14:30:15.123`.|
|`outputTimeZone`|string|Required. The requested time zone. For example `UTC`.|
|`inputTimeZone`|string|Optional. The time zone to use if the time doesn’t include a time zone. For example, `America/Los_Angeles`.|

## Outputs

|Output|Type|Description|
|------|----|-----------|
|`dateTime`|string|The time after it's converted to the required time zone, in the format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX`. For example, `2025-02-24T14:30:15.123Z`.|

## Example

Sample request body:

```nolang
{
  "inputs" : [{
    "time" : "2025-02-24T14:30:15.123",
    "outputTimeZone" : "UTC",
    "inputTimeZone" : "America/Los_Angeles"
  }]
}
```

Sample response body:

```nolang
{
  "actionName" : "convertTimeZone",
  "errors" : null,
  "isSuccess" : true,
  "outputValues" : {
    "dateTime" : "2025-02-24T22:30:15.123Z"
  }
}
```

