Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk
Welcome to the GeekTalk Webmaster Discussion Forums from GeekVillage.com

Click Here To Register. It's Free!

Go Back   geek/talk: Signature-free discourse for serious web publishers > YOUR CREATION: Building & Maintaining A Web Site > Web Development - Programming / Coding
User Name
Password
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 09-27-2001, 10:22 AM   #1
SiliconAlleyDude
Registered User
 
SiliconAlleyDude's Avatar
 
Join Date: Sep 2001
Location: LA, Chicago, Amsterdam
Posts: 18
Angry World Clock needed on web page

I am buiding a site that will be hosted on an apache server.

I would like to include a world clock on the page. This world clock exsists of 7 different clocks, and need to be synced by an official time server for accuracy purposes.

Does anyone know of a script or way that I could implement this in a page.
SiliconAlleyDude is offline   Reply With Quote
Old 09-27-2001, 06:26 PM   #2
fphotoworks
Registered User
 
fphotoworks's Avatar
 
Join Date: Apr 2001
Posts: 69
Default World Clock

Hi I don't understand the need for so much accuracy when your browsers internal clock can be used.

This Java script can be played with to look interesting on the page using tables.


<!-- THREE STEPS TO INSTALL WORLD CLOCK:

1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Emanuel Gavrilv (eltal@sprint.ca) -->
<!-- Web Site: http://www.angelfire.com/on/eltal -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function GetTime() {
var dt = new Date();
var def = dt.getTimezoneOffset()/60;
var gmt = (dt.getHours() + def);
document.clock.local.value = (IfZero(dt.getHours()) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()));
var ending = ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds());
var rome =check24(((gmt + 1) > 24) ? ((gmt + 1) - 24) : (gmt + 1));
document.clock.rome.value = (IfZero(rome) + ending);
var isr =check24(((gmt + 2) > 24) ? ((gmt + 2) - 24) : (gmt + 2));
document.clock.Israel.value = (IfZero(isr) + ending);
var msw =check24(((gmt + 3) > 24) ? ((gmt + 3) - 24) : (gmt + 3));
document.clock.msw.value = (IfZero(msw) + ending);
var baku =check24(((gmt + 4) > 24) ? ((gmt + 4) - 24) : (gmt + 4));
document.clock.baku.value = (IfZero(baku) + ending);
var del =check24(((gmt + 5) > 24) ? ((gmt + 5) - 24) : (gmt + 5));
document.clock.del.value = (IfZero(del) + ending);
var dh =check24(((gmt + 6) > 24) ? ((gmt + 6) - 24) : (gmt + 6));
document.clock.dh.value = (IfZero(dh) + ending);
var kok =check24(((gmt +7 ) > 24) ? ((gmt +7 ) - 24) : (gmt + 7));
document.clock.kok.value = (IfZero(kok) + ending);
var ho =check24(((gmt + 8) > 24) ? ((gmt + 8) - 24) : (gmt + 8));
document.clock.ho.value = (IfZero(ho) + ending);
var tky =check24(((gmt + 9) > 24) ? ((gmt + 9) - 24) : (gmt + 9));
document.clock.tky.value = (IfZero(tky) + ending);
var sdn =check24(((gmt + 10) > 24) ? ((gmt + 10) - 24) : (gmt + 10));
document.clock.sdn.value = (IfZero(sdn) + ending);
var mag =check24(((gmt + 11) > 24) ? ((gmt + 11) - 24) : (gmt + 11));
document.clock.mag.value = (IfZero(mag) + ending);
var wll =check24(((gmt + 12) > 24) ? ((gmt + 12) - 24) : (gmt + 12));
document.clock.wll.value = (IfZero(wll) + ending);

var _GMT =check24(((gmt) > 24) ? ((gmt) - 24) : (gmt));

document.clock._GMT.value = (IfZero(_GMT) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()));
var eniw =check24(((gmt + (24-12)) > 24) ? ((gmt + (24-12)) - 24) : (gmt + (24-12)));
document.clock.eniw.value = (IfZero(eniw) + ending);
var sam =check24(((gmt + (24-11)) > 24) ? ((gmt + (24-11)) - 24) : (gmt + (24-11)));
document.clock.sam.value = (IfZero(sam) + ending);
var haw =check24(((gmt + (24-10)) > 24) ? ((gmt + (24-10)) - 24) : (gmt + (24-10)));
document.clock.Hawaii.value = (IfZero(haw) + ending);
var ala =check24(((gmt + (24-9)) > 24) ? ((gmt + (24-9)) - 24) : (gmt + (24-9)));
document.clock.alaska.value = (IfZero(ala) + ending);
var pacif =check24(((gmt + (24-8)) >= 24) ? ((gmt + (24-8)) - 24) : (gmt + (24-8)));
document.clock.pacif.value = (IfZero(pacif) + ending);
var mount =check24(((gmt + (24-7)) > 24) ? ((gmt + (24-7)) - 24) : (gmt + (24-7)));
document.clock.mount.value = (IfZero(mount) + ending);
var center =check24(((gmt + (24-6)) > 24) ? ((gmt + (24-6)) - 24) : (gmt + (24-6)));
document.clock.center.value = (IfZero(center) + ending);
var east =check24(((gmt + (24-5)) > 24) ? ((gmt + (24-5)) - 24) : (gmt + (24-5)));
document.clock.east.value = (IfZero(east) + ending);
var atl =check24(((gmt + (24-4)) > 24) ? ((gmt + (24-4)) - 24) : (gmt + (24-4)));
document.clock.atl.value = (IfZero(atl) + ending);
var bra =check24(((gmt + (24-3)) > 24) ? ((gmt + (24-3)) - 24) : (gmt + (24-3)));
bra = (bra >= 24) ? bra - 24 : bra;
document.clock.bra.value = (IfZero(bra) + ending);
var mid =check24(((gmt + (24-2)) > 24) ? ((gmt + (24-2)) - 24) : (gmt + (24-2)));
mid = (mid >= 24) ? mid - 24 : mid;
document.clock.mid.value = (IfZero(mid) + ending);
var azo =check24(((gmt + (24-1)) > 24) ? ((gmt + (24-1)) - 24) : (gmt + (24-1)));
azo = (azo >= 24) ? azo - 24 : azo;
document.clock.azo.value = (IfZero(azo) + ending);
setTimeout("GetTime()", 1000);
**
function IfZero(num) {
return ((num <= 9) ? ("0" + num) : num);
**
function check24(hour) {
return (hour >= 24) ? hour - 24 : hour;
**
// End -->
</script>
</HEAD>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

<BODY onLoad="javascript:GetTime();">

<!-- STEP THREE: Copy this code into the BODY of your HTML document -->

<center>
<form name="clock">
<strong>Local Time <input type="text" size="8" name="local"></strong>
<p>
Eniwetok (GMT-12) <input type="text" size="8" name="eniw"><br>
Samoa (GMT-11) <input type="text" size="8" name="sam"><br>
Hawaii (GMT-10) <input type="text" size="8" name="Hawaii">
<p>
Alaska (GMT-9) <input type="text" size="8" name="alaska"><br>
Pacific Time (GMT-8) <input type="text" size="8" name="pacif"><br>
Mountain Time (GMT-7) <input type="text" size="8" name="mount">
<p>
Central Time (GMT-6) <input type="text" size="8" name="center"><br>
Eastern Time (GMT-5) <input type="text" size="8" name="east"><br>
Atlantic Time (GMT-4) <input type="text" size="8" name="atl">
<p>
Brazilia (GMT-3) <input type="text" size="8" name="bra"><br>
Mid-Atlantic (GMT-2) <input type="text" size="8" name="mid"><br>
Azores (GMT-1) <input type="text" size="8" name="azo">
<p>
<strong>Greenwich Mean Time (GMT) <input type="text" size="8" name="_GMT"></strong>
<p>
Rome (GMT +1) <input type="text" size="8" name="rome"><br>
Israel (GMT +2) <input type="text" size="8" name="Israel"><br>
Moscow (GMT +3) <input type="text" size="8" name="msw">
<p>
Baku (GMT +4) <input type="text" size="8" name="baku"><br>
New Delhi (GMT +5) <input type="text" size="8" name="del"><br>
Dhakar (GMT +6) <input type="text" size="8" name="dh">
<p>
Bangkok (GMT +7) <input type="text" size="8" name="kok"><br>
Hong Kong (GMT +8) <input type="text" size="8" name="ho"><br>
Tokyo (GMT +9) <input type="text" size="8" name="tky">
<p>
Sydney (GMT +10) <input type="text" size="8" name="sdn"><br>
Magadan (GMT +11) <input type="text" size="8" name="mag"><br>
Wellington (GMT +12) <input type="text" size="8" name="wll">
</form>
</center>

<p><center>
<font face="arial, helvetica" SIZE="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 5.96 KB -->
fphotoworks is offline   Reply With Quote
Old 09-28-2001, 04:27 PM   #3
SiliconAlleyDude
Registered User
 
SiliconAlleyDude's Avatar
 
Join Date: Sep 2001
Location: LA, Chicago, Amsterdam
Posts: 18
Default

The site I am building will be uttilized by 3 different network management centers in the world.

Accuracy is a high priority because our ticketing system that gets their clocking from a official time server actually tracks when a scheduled work is started (in the system.)

Our performance team will also request router logs and compare them against the maintenance tickets.
Customers can also request these tickets and log outputs. Therefore it is critical to have one unified clocking source that is used by every network management technician.

Thanks in advanced

-- Vince --
SiliconAlleyDude is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
For Sale: 320,000+ page Export Import industry b2b Portal & Directory eximportal Website For Sale - Purchase - Barter - Trade 4 12-16-2005 12:19 AM
Web Rank : Yahoo's answer to Google Page Rank. sdarken Search Engine Marketing & Optimization 4 03-22-2004 05:41 PM
Is my web host a jerk...or am I? Rhea Web Hosting Discussion 4 10-27-2001 09:30 PM
Good place for Web Page templates? Strider Making Money with CPC and/or CPM Programs 3 01-20-2001 01:14 AM

Please support our advertisers. They ensure our survival.

All times are GMT -5. The time now is 10:31 AM.


GeekVillage.com is copyright © 1998-2015 Curiosity Cave - Science gifts for clever kids. All rights reserved.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.