Timezone Adjustment Contexts

This page demonstrates Hashtag Contexts for Timezones.   The Hashtag Framework supports all of the Timezones supported by PHP.   The Hashtag Markup is shown below <# in bold #>.   The adjusted date & time values are injected into the HTML page after the ⇒ symbol.  

<#[system.date_time_short]#> ⇒ 2024-07-22 06:53:43
<#[system.date_time_short as timezone]#> ⇒ 2024-07-22 02:53:43
<#[system.date_time_short as tz "America/Los_Angeles"]#> ⇒ 2024-07-21 23:53:43
<#[session.timezone]#> ⇒ America/New_York
<#[session.tz]#> ⇒ America/New_York

Processing this Hashtag Markup:
<h4 class="alert alert-success text-center">
	Local Time: <#[system.date_time as timezone as date "h:mm A"]#>

Local Time: 2:53 AM

Note:  When a bare "timezone" or "tz" context is used, any "timezone" or "tz" value in the current session is applied to adjust the Date Time value.

If the current session does not include either a "timezone" or "tz" value, but a latitude, longitude, and country code values are available (such as in Google App Engine requests), a best guess timezone is calculated and set for the current session.   The best guess calculation for timezone isn't always right, such as for cities that opt out of daylight savings time, cities with multiple timezones, overhanging borders, as well as users who route their internet traffic over a VPN in a different timezone, so it's best to allow the user to select their own timezone.

The Hashtag Markup Language provides Contexts for reformatting Variable values.  

The examples in this section cover the many Contexts the Hashtag Framework supports to alter Variable values.