Handlebars Helper Function: timezoneConversion

Converts a date from one time zone to another. Use this helper to show dates in the appropriate time zone for your recipients.

Availability

This helper is available in the Summer ’26 release of Marketing Cloud Next.

Syntax

{{timezoneConversion date sourceTZ targetTZ}}

Parameters

Parameter Type Description
date String or Object Required. The date to convert.
sourceTZ String Required. The source time zone.
targetTZ String Required. The target time zone.

Date Input

You can specify date in these formats:

  • US formats: MM/dd/yyyy, M/d/yyyy, MM/dd/yyyy HH:mm:ss, M/d/yyyy h:mm a, or M/d/yyyy h:mm:ss a

  • ISO formats: yyyy-MM-dd, yyyy-MM-dd HH:mm:ss, yyyy-MM-dd'T'HH:mm:ss, or yyyy-MM-dd'T'HH:mm:ss.SSSZ

  • 12-hour time: M/d/yyyy h:mm a, yyyy-MM-dd h:mm a, or yyyy-MM-dd h:mm:ss a

  • Time-only: h:mm a or h:mm:ss a

    note: If you specify only a time, the helper function uses the current date.

  • Long-form English: d MMMM yyyy, MMMM d, yyyy, or EEEE, MMMM d, yyyy

  • Chinese and Japanese notation: yyyy年M月d日

  • Korean notation: yyyy년 M월 d일 or yyyy년M월d일

Time Zone Inputs

You can specify sourceTZ and targetTZ in these formats:

  • IANA time zone names, such as America/Los_Angeles, Europe/Kiev, or Asia/Hong_Kong.

  • Time zone abbreviations. The helper function supports these abbreviations:

    • UTC: Coordinated Universal Time
    • EST: Eastern Standard Time (North America)
    • EDT: Eastern Daylight Time (North America)
    • CST: Central Standard Time (North America)
    • CDT: Central Daylight Time (North America)
    • MST: Mountain Standard Time (North America)
    • MDT: Mountain Daylight Time (North America)
    • PST: Pacific Standard Time (North America)
    • PDT: Pacific Daylight Time (North America)

    note: Using abbreviations can lead to confusion and code maintenance issues. For example, in English, "CST" can stand for "China Standard Time", "Central Standard Time", or "Cuba Standard Time".

    For best results, use IANA time zone names, which eliminate this ambiguity.

Return Value

The function returns a date-time string in ISO-8601 format (yyyy-MM-dd'T'HH:mm:ss) representing the date converted to the target time zone. You can send this output to other helper functions, such as dateDiff.

The function automatically handles Daylight Saving Time (DST) transitions based on the date provided.

See Also