CFLib.org – Common Function Library Project

SwatchIT()

Last updated July 5, 2002

author

B Kiefer

Version: 1 | Requires: CF5 | Library: DateLib

Description:
The goal of sIT may be commercial, but a base10 clock is wonderful. This function can be very useful in timestamps and other query string variables. This function should self adjust for your UTC offset. See http://www.ypass.net for PHP and Perl versions. See http://www.swatch.com for information.

Return Values:
Returns a string.

Example:

<!--- Remember that we cache UDF results, so output below will not change. --->
<cfoutput>
#swatchIT()#
</cfoutput>

Parameters:

No arguments.

Full UDF Source:

/**
 * Returns the current internet time.
 * 
 * @return Returns a string. 
 * @author B Kiefer (packetsdontlie@mac.com) 
 * @version 1, July 5, 2002 
 */
function swatchIT(){
	var myutc = GetTimeZoneInfo();
	var beats = ((3600 + Val(Hour(now()) * 3600) + Val(Minute(now()) * 60) + Second(now()) + val(myutc.utcTotalOffset)) mod 86400) / 86.4;
	return decimalformat(beats);
}
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson