Full version: jsB@nk » Time » Clock » World-time-ticker for over 20 world-capitals inside the status-bar
URL: https://www.javascriptbank.com/world-time-ticker-for-over-20-world-capitals-inside-the-status-bar.html
This is probably the very first realtime world-time-ticker displaying and scrolling the localtime of over 20 world-capitals inside your status-bar.
Full version: jsB@nk » Time » Clock » World-time-ticker for over 20 world-capitals inside the status-bar
URL: https://www.javascriptbank.com/world-time-ticker-for-over-20-world-capitals-inside-the-status-bar.html
<SCRIPT language=javaScript><!-- Beginning of JavaScript -// World-time-ticker// Below you can add or delete new locations. The digital value after the // name of the capitals shows the difference to GMT-time.var worldtime = new Array()worldtime[0]="Azores,-2"worldtime[1]="Baghdad,3"worldtime[2]="Beijing,8"worldtime[3]="Berlin,2"worldtime[4]="Buenos Aires,-3"worldtime[5]="Chicago,-6"worldtime[6]="Denver,-7"worldtime[7]="Hong Kong,8"worldtime[8]="Honolulu,-10"worldtime[9]="Johannesburg,2"worldtime[10]="Kairo,2"worldtime[11]="Lima,-5"worldtime[12]="London,0"worldtime[13]="Mexico City,-6"worldtime[14]="Moscow,3"worldtime[15]="New York,-5"worldtime[16]="Paris,1"worldtime[17]="Perth,8"worldtime[18]="Rio de Janheiro,-3"worldtime[19]="San Francisco,-8"worldtime[20]="Sydney,11"worldtime[21]="Tokyo,9"// The speed of the ticker (milliseconds)var speed=1000// The length of the stepsvar step=10// Do not edit the variables belowvar hoursvar shifthoursvar minutesvar secondsvar localhoursvar thisplacevar i_substring=0var contentfunction extracttime() {content=" -------------------------------------"for (i=0;i<=worldtime.length-1;i++) {thisplace=worldtime[i].split(",")thistime= new Date()hours=thistime.getUTCHours()hours=eval(hours)shifthours=eval(thisplace[1])localhours=eval(shifthours+hours)if (localhours <0) {localhours=24+localhours}if (localhours >=24) {localhours=localhours-24}minutes=thistime.getUTCMinutes()seconds=thistime.getUTCSeconds()if (thisplace[0]=='Delhi') {minutes=eval(minutes+30)if (minutes>=60) {minutes=eval(minutes-60)localhours=eval(localhours+1)}}if (eval(minutes) < 10) {minutes="0"+minutes}if (eval(seconds) < 10) {seconds="0"+seconds}if (eval(localhours) < 10) {localhours="0"+localhours}thistime = localhours+":"+minutescontent+=" ------ "+thisplace[0]+": "+thistime}content+=" -------------------------------------"scrolltime()}function scrolltime() {if (i_substring<=content.length-1) {window.status=content.substring(i_substring,content.length-1)i_substring=i_substring+stepvar timer=setTimeout("extracttime()",speed)}else {i_substring=0clearTimeout(timer)extracttime()}}// - End of JavaScript - --></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<BODY onload=extracttime()><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->