Runtime verified Test scripts included

Converts a date to a different time zone.

Syntax

{{timezoneConversion date sourceTZ targetTZ}}

Returns string.

Parameters

Name Type Required Description
date string Yes Input date.
sourceTZ string Yes Time zone of the input date.
targetTZ string Yes Time zone to convert to.

Example

Tested in a Marketing Cloud Next email on 2026-11-25, alone in the email:

  • {{timezoneConversion "2025-01-15 12:00:00" "UTC" "America/New_York"}} renders 2025-01-15T07:00:00, the ISO-8601 format the docs name as return value.
  • Helper names are case-sensitive. {{timeZoneConversion …}} (capital Z) is rejected when the email is saved as an unsupported helper; only the documented spelling timezoneConversion works.
Show Next test script
<!-- Marketing Cloud Next test script for the timezoneConversion helper. Paste it into the HTML component of a
     Next email and open the preview. Each line prints the result Next gave when the call
     was rendered on its own (expect) next to the result of this run (got).
     Assembled from single-call test emails (dates on the page); it has not been
     run as one email. Calls that make Next fail are listed separately. -->
<p>c1 expect=[2025-01-15T07:00:00] got=[{{timezoneConversion "2025-01-15 12:00:00" "UTC" "America/New_York"}}]</p>

Show calls that fail in Next (one email each)
<!-- Run each call below in its own Next email: one of them in a combined email
     would stop the whole preview or block the save. -->

<!-- email 1: expect that the save is rejected (HTTP 400) -->
{{timeZoneConversion "2025-01-15 12:00:00" "UTC" "America/New_York"}}

<!-- email 2: expect that the save is rejected (HTTP 400) -->
{{timeZoneConversion "2025-07-15 12:00:00" "UTC" "America/Los_Angeles"}}

Marketing Cloud Next

Works as documented

Every tested call rendered the documented result. Write the name as the docs do: timezoneConversion; timeZoneConversion is rejected at save. Tested 2026-11-25 by rendering in a Marketing Cloud Next email.

See also