ecm:timeZone
    • 1 Minute to read
    • Dark
      Light

    ecm:timeZone

    • Dark
      Light

    Article summary

    The function ecm:timeZone converts the specified time zone ID to a (Java utility class) timezone. The value returned is a timezone type.

    This function is often used to convert values to timezones for use with functions that require timezone types in parameters.

    Example

    A message is sent to all customers who made a purchase in the last 5 days. The ecm:addInterval function returns the value of today's date minus five days:

    ecx:formatDate(ecm:addInterval(date.today, '-5d'),'yyyy-MM-dd',ecm:timeZone('Europe/London'),'',false.

    The ecm:timeZone function determines which time zone is used when calculating the value of today's date (date.today).

    Structure​

    ecm:timeZone(string)

    Parameters​

    Parameter

    Description

    string

    Specifies the target time zone ID to convert.


    Was this article helpful?

    What's Next