Timezone
{{ timezone }}
Properties of {{ timezone }} objects
| Name |
Type |
Description |
| is_valid |
Boolean |
True if the value is a valid timezone string |
| value |
String |
timezone string |
| default_value |
String |
The default value for this field if no value is specified |
| field_id |
String |
The identifier for this field |
| label |
String |
The label for this field |
| output |
String |
timezone string. May include additional markup in the editor preview to make it easier to edit content |
Stores the timezone that should be used when displaying a date and/or time.
Related
Can be any text, from the empty string ("") to the full HTML output of the template. When used alone in a conditional, all strings evaluates as true - even if they are empty or a value such as "0" or "false".
{% set_timezone %}
Sets the default timezone to use when rendering dates and times on the page that do not already have a separate timezone configured.
Some dates and times do not use the default timezone and will not be affected by this method.
Examples
Demonstrates how to set Timezone by String.
{% set_timezone "America/Indianapolis" %}
{{ request.date | timezone }}
America/Indianapolis
{% var cityname = "Amsterdam" %}
{% set_timezone "Europe/" | append: cityname %}
{{ request.date | timezone }}
Europe/Amsterdam
Related
Sets the meta description for the current page, which is output by default as part of an HTML page's {{ automatic_markup }}.
Saves custom properties on the session. Note that this doesn't mean much unless the user (or the developer) has granted permission for sessions.
Sets the Content-Type header for the HTTP response.
Sets the robots meta directive.
Saves custom properties on the client that will survive across multiple sessions until they are changed, unset, or the "session" permission expires. Note that this doesn't mean much unless the user (or the developer) has granted permission for sessions.
Sets the URL to the favicon for the current page, which is output by default as part of an HTML page's {{ automatic_markup }}.
Saves custom values to predefined profile settings that will be accessible whenever the current profile is logged in. Note that this is meaningless unless the user is logged in. Profile settings may include validation, in which case all settings will be validated before being set and any validation error will prevent the setting(s) from being set. Validation errors may optionally be output to a variable.
Replaces a value on the nearest scope where it has already been defined. If it has not been defined yet, it is stored on the root scope.
Sets one or more headers in the HTTP response.
Defines whether the client has granted or deined permission for a particular feature (eg: sessions). The only permission defined by default is the session permission (configurable in the site properties). However, the template developer may use this mechanism for their own purposes as well. The permissions defined by this method will be stored in the permissions cookie, which may be read and/or modified by client-side javascript.
Sets properties on an editable dictionary object. If the dictionary does not exist it will be created and stored on the current scope. If the dictionary exists but is not editable this will throw an error.
Sets a cookie in the HTTP response.
Sets the canonical URL for the current page, which is output by default as part of an HTML page's {{ automatic_markup }}.
Sets the HTTP response status code.
Saves custom properties on the profile that will be accessible whenever the current profile is logged in. The properties will be saved to the profile's attribute dictionary. Note that this is meaningless unless the user is logged in.
to_timezone filter
Converts a date to the specified timezone.
Related
Sets the default timezone to use when rendering dates and times on the page that do not already have a separate timezone configured.
timezone filter
Returns the timezone that the date is in. If full is true or if an abbreviated timezone name is not available, returns the full timezone identifier (eg: "Europe/Rome"). If full is false (default) or not specified and an abbreviated timezone name is available returns the abbreviated timezone name (eg: "PST" or "PDT").
Examples
Use the timezone filter to output the timezone used by a date object. The output may either be the full timezone identifier or the shortened timezone abbreviation.
{{request.date | timezone}}
EST
{{request.date | add_months: 6 | timezone}}
EDT
{{request.date | timezone: true}}
America/Indiana/Indianapolis
Related
Examples
Demonstrates multiple ways to use the to_timezone filter.
{{ article.post_date | to_timezone: session.user_timezone }} local time
{{ article.post_date | to_timezone: 'UTC' }} UTC
{{ article.post_date | to_timezone: 'Europe/Rome' }} CET
2026-02-16 6:00:00 local time
2026-02-16 10:00:00 UTC
2026-02-16 11:00:00 CET
{% if entity.alt_timezone.is_valid %}
{{ entity.alt_date | to_timezone: entity.alt_timezone | date: 'f' }} {{ entity.alt_timezone }}
{% endif %}
2026-02-16 12:00:00
Use the timezone filter to output the timezone used by a date object. The output may either be the full timezone identifier or the shortened timezone abbreviation.
{{request.date | timezone}}
EST
{{request.date | add_months: 6 | timezone}}
EDT
{{request.date | timezone: true}}
America/Indiana/Indianapolis
Demonstrates how to set Timezone by String.
{% set_timezone "America/Indianapolis" %}
{{ request.date | timezone }}
America/Indianapolis
{% var cityname = "Amsterdam" %}
{% set_timezone "Europe/" | append: cityname %}
{{ request.date | timezone }}
Europe/Amsterdam
Use the add_seconds, add_minutes, add_hours, add_days, add_weeks, add_months, and add_years filters to manipulate dates.
{% var startdate = '2009-09-09T00:00:00Z' | to_timezone: 'UTC' %}
{{ startdate | add_seconds: 3 }}
9/9/2009 12:00:03 AM
{{ startdate | add_seconds: -10239 }}
9/8/2009 9:09:21 PM
{{ startdate | add_minutes: 3 }}
9/9/2009 12:03:00 AM
{{ startdate | add_minutes: -180 }}
9/8/2009 9:00:00 PM
{{ startdate | add_hours: 3 }}
9/9/2009 3:00:00 AM
{{ startdate | add_hours: -32 }}
9/7/2009 4:00:00 PM
{{ startdate | add_days: 3 }}
9/12/2009 12:00:00 AM
{{ startdate | add_days: -2 }}
9/7/2009 12:00:00 AM
{{ startdate | add_weeks: 3 }}
9/30/2009 12:00:00 AM
{{ startdate | add_weeks: -7 }}
7/22/2009 12:00:00 AM
{{ startdate | add_months: 3 }}
12/9/2009 12:00:00 AM
{{ startdate | add_months: -10 }}
11/9/2008 12:00:00 AM
{{ startdate | add_years: 3 }}
9/9/2012 12:00:00 AM
{{ startdate | add_years: -1 }}
9/9/2008 12:00:00 AM
You can use the date filter either to create a date object or to format a date as a string.
{{ "2009-09-09" | date }}
9/9/2009 12:00:00 AM
{{ "2009-09-09" | date: "D" }}
Wednesday, September 9, 2009
{{ 0 | date: "D" }}
Thursday, January 1, 1970
{{ 1756239994 | date: "D" }}
Tuesday, August 26, 2025
{{"now" | date}}
2009-09-09T00:00:00.0000000+00:00 (or whatever the current date is)
{{request.date | date: "d"}}
9/9/2009
{{request.date | date: "D"}}
Sunday, September 9, 2009
{{request.date | date: "o"}}
9/9/2009 12:00:00 AM
{{request.date | date: "MMMM dd, yyyy"}}
September 09, 2009