Chapter 2: ColdFusion Functions
371
GetTimeZoneInfo
Returns a structure containing time zone information for the machine on which this
function is executed. The structure contains four elements with the following keys.
•
utcTotalOffset — total offset of the local time in minutes from UTC (Universal
Coordinated Time). A plus sign (+) indicates that a time zone is west of UTC,
such as all of the time zones in North and South America. A minus sign (-)
indicates that a time zone is east of UTC, such as the time zones in Germany.
•
utcHourOffset — offset in hours of local time from UTC.
•
utcMinuteOffset — offset in minutes after the hours offset is taken into
account. For North America, this will always be zero. However, for some
countries that do not land exactly on the hour offset, the number will be
between 0 and 60. For example, standard time in Adelaide, Australia has an
offset of 9 hours and 30 minutes from UTC.
•
isDSTOn — True if Daylight Savings Time (DST) is on in the host machine;
False if DST is off.
See also
DateConvert
,
CreateDateTime
and
DatePart
.
Syntax
GetTimeZoneInfo
()
Examples
<HTML>
<HEAD>
<TITLE>GetTimeZoneInfo Example</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>GetTimeZoneInfo Example</H3>
<!--- This example shows the use of GetTimeZoneInfo --->
<CFOUTPUT>
The local date and time are #now()#.
</CFOUTPUT>
<CFSET info = GetTimeZoneInfo()>
<CFOUTPUT>
<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>
</CFOUTPUT>
</BODY>
</HTML>
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...