Set Session Timezone

This page uses a Hashtag Action-Only Form to provide a list of available Timezones, and save the selected Timezone in the current session.   The Form is styled using Bootstrap 3 default theme classes.  

Note:  The "for country" value in the Print Session Timezone Options command is optional, supporting all two-letter ISO 3166-1 country codes.

If the current Session includes a "timezone" or "tz" value, the option for that timezone will be selected.



Processed this Hashtag Markup:
<# start action form;
	set form.class to "form-inline";
	when processing set session.timezone to "<# form.timezone #>";
	when done and ("<#[url.land]#>"!="") redirect to "<#[url.land]#>";
	when done redirect to "/contexts/timezone";
#>

<div class="form-group">
	<label for="timezone">Timezone</label>
	<select <# timezone #> class="form-control">
		<# print session timezone options for country "US"; #>
	</select>
</div>
<input type="submit" <# process button #> class="btn btn-primary" value="Set Timezone">

<# end form #>

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.