# Convert DateTime to timezone transform action

## Use case

You are working with an API that returns a time in UTC, you would like to localize this value to your timezone or a specific timezone.

## Overview

<figure><img src="https://1835401289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQQ1EHVcEsGKBPVHmiav%2Fuploads%2F56n9VnZqz6NrOrrHy2Ma%2FScreenshot%202025-04-18%20at%202.38.40%E2%80%AFPM.png?alt=media&#x26;token=b8bc1363-c523-4d32-b54a-38dcefe19c0e" alt="" width="191"><figcaption></figcaption></figure>

Convert a DateTime to a different timezone.

## Parameters

<table><thead><tr><th width="217">Parameter</th><th width="417.3333333333333">Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>DateTime to convert</td><td>Use <a href="https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior">https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior</a> for various options</td><td>true</td></tr><tr><td>Timezone to convert</td><td>Use https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for various options not listed</td><td>true</td></tr></tbody></table>

{% hint style="info" %}
Some timezone values are timezone naive, such as EST. If you would like to use a timezone aware value then, as an example, you should use America/New\_York or US/Eastern.
{% endhint %}

## Usage

<details>

<summary>Example: Convert a UTC timestamp to EST/EDT</summary>

Inputs:

**DateTime to convert:** 2025-04-16T09:00:30.000Z

**Timezone to return:** US/Eastern

</details>

## Results output

Result of Example:

```json
"2025-04-16T05:00:30-04:00"
```


---

# 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.rewst.help/documentation/automations/actions-in-rewst/transform-actions/convert-datetime-to-timezone-transform-action.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.
