Full version: jsB@nk » Time » Clock » Time by Hawaii Zone script
URL: https://www.javascriptbank.com/time-by-hawaii-zone-script.html
No matter which time zone you're in, this script shows you the date & time in Hawaii and your date & time. Two different formats display the code in American Standard Code and in UTC. Great for business sites that bridge different time zones or even for International sites. Short and sweet, this code is easily manipulated for anywhere in the world... not just Hawaii. Please distribute freely.
Full version: jsB@nk » Time » Clock » Time by Hawaii Zone script
URL: https://www.javascriptbank.com/time-by-hawaii-zone-script.html
<SCRIPT language=JavaScript>// Author: Ravenfunction HawaiiTimeString(iDate) {// Needed for both Time Functionsvar theTime = iDate.getTime()// If wanted, shows local time.var myTime = iDate.toLocaleString()var myUTCTime = iDate.toString()// To figure the Time Zone at Hawaii Standard Time// Best for American Sitesvar myTimeZone = iDate.getTimezoneOffset()/-60var HawaiiTimeZone = -10var hourDiff = (myTimeZone - HawaiiTimeZone)var HTimeDiff = hourDiff*3600000var HTimeStandard = theTime-HTimeDiffvar HawaiiTime = iDate.toLocaleString(iDate.setTime(HTimeStandard))// To figure the Time Zone at Hawaii UTC using GMT// Best for International Sitesvar GMTZone = iDate.toGMTString()var GMTTime = iDate.getTime(iDate.toGMTString())// HiTime are the Hours in Milliseconds (360,000) times the Hawaii Time Zone of -10// Adjust code for your Time Zonevar HiTime = theTime-(36000000)var UTCHiTime = iDate.toGMTString(iDate.setTime(HiTime))return "Hawaii Standard Time is: " + "<u>"+ HawaiiTime + "</u>" +"<p>UTC Hawaii Time is: " + "<u>" + UTCHiTime + "</u>" +"<p>Your Time is: " + "<u>" + myTime + "</u>" + "<p>Your UTC Time is: " + "<u>" + myUTCTime + "</u>"}</SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<SCRIPT>document.write(HawaiiTimeString(new Date()))</SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->