Skip to Main Content
Programming ColdFusion MX, 2nd Edition
book

Programming ColdFusion MX, 2nd Edition

by Rob Brooks-Bilson
August 2003
Intermediate to advanced content levelIntermediate to advanced
1140 pages
68h 45m
English
O'Reilly Media, Inc.
Content preview from Programming ColdFusion MX, 2nd Edition

Name

GetTimeZoneInfo

Synopsis

                  
                  GetTimeZoneInfo( )

Returns a structure containing time-zone information for the host server calling the function. The following structure keys are returned by calling GetTimeZoneInfo( ):

UTCTotalOffset

Returns the local offset time in minutes from Universal Coordinated Time (UTC). UTC is coordinated on the prime meridian (running through Greenwich, U.K.). Positive offset values represent time zones west of the prime meridian, while negative offsets represent time zones east of the prime meridian.

UTCHourOffset

Returns the local offset time from UTC in hours.

UTCMinuteOffset

Returns the local offset time in minutes after UTCHourOffset is applied. The value for UTCHourOffset can range from 0 to 60 depending on where a particular time zone falls in relation to the nearest hour offset. All North American time zones return 0 for UTCMinuteOffset.

IsDSTOn

Returns true if daylight savings time (DST) is turned on for the host machine and false if it isn’t.

Example:

<cfset MyTimeZoneInfo = GetTimeZoneInfo( )>
   
<cfoutput>
Local time is offset #MyTimeZoneInfo.utcTotalOffset# minutes from UTC.<br>
Local time is offset #MyTimeZoneInfo.utcHourOffset# hours and 
#MyTimeZoneInfo.utcMinuteOffset# minutes from UTC.<br>
Daylight Saving Time is <cfif #MyTimeZoneInfo.isDSTOn#><b>on</b>
<cfelse><b>off</b></cfif> for the host.
</cfoutput>
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming ColdFusion

Programming ColdFusion

Rob Brooks-Bilson

Publisher Resources

ISBN: 0596003803Supplemental ContentErrata Page