GetTimezoneInfo
Retrieves a struct of information about the timezone
Method Signature
GetTimezoneInfo(timezone=[string], locale=[string])
Arguments
Argument
Type
Required
Description
Default
timezone
string
false
optional, a specific timezone to retrieve information on
locale
string
false
optional, a specific locale for language output of the timezone name fields
Examples
Output timezone information
This example shows the use of GetTimeZoneInfo
<bx:output>
The local date and time are #now()#.
</bx:output>
<bx:set info = GetTimeZoneInfo() >
<bx:output>
<p>Total offset in seconds is #info.UTCTOTALOFFSET#.</p>
<p>Offset in hours is #info.UTCHOUROFFSET#.</p>
<p>Offset in minutes minus the offset in hours is #info.UTCMINUTEOFFSET#.</p>
<p>Is Daylight Savings Time in effect? #info.ISDSTON#.</p>
</bx:output>
Get Hawaii timezone information in German
Shows the use of getTimeZoneInfo for a known / specific timezone with German locale.
<bx:script>
var tz = getTimeZoneInfo( "US/Hawaii", "de-DE" );
</bx:script>
Additional Examples
dump( GetTimeZoneInfo() );
Related
Last updated
Was this helpful?