getTimeZoneInfo
Description
Gets local time zone information for the computer on which it is called, relative to Universal Time Coordinated (UTC). UTC is the mean solar time of the meridian of Greenwich, England, used as the basis for calculating standard time throughout the world.
Categories
Related
Syntax
GetTimeZoneInfo()
Returns
Structure
that contains these elements and keys:
utcTotalOffset:
offset of local time, in seconds, from UTC
A plus
sign indicates a time zone west of UTC (such as a zone in North America)
A minus sign indicates a time zone east of UTC (such as a
zone in Germany)
utcHourOffset: offset, in hours of local time, from UTC
utcMinuteOffset: offset, in minutes, beyond the hours offset.
For North America, this is 0. For countries that are not exactly
on the hour offset, the number is from 0 through 60. For example,
standard time in Adelaide, Australia is offset 9 hours and 30 minutes
from UTC.
isDSTOn: True, if Daylight Savings Time (DST) is on in the
host; False, otherwise
Example
<h3>GetTimeZoneInfo Example</h3>
<!--- This example shows the use of GetTimeZoneInfo --->
<cfoutput>
The local date and time are #now()#.
</cfoutput>
<cfset info = GetTimeZoneInfo()>
<cfoutput>
Total offset in seconds is #info.utcTotalOffset#.</p>
Offset in hours is #info.utcHourOffset#.</p>
Offset in minutes minus the offset in hours is
#info.utcMinuteOffset#.</p>
Is Daylight Savings Time in effect? #info.isDSTOn#.</p>
</cfoutput>