Webmaster Forum

Go Back   Webmaster Forum > Scripting/Programming & Debugging > JavaScript & AJAX Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

JavaScript & AJAX Forum Get help from a webmaster about the exciting and user-friendly things JavaScript has to offer in this forum.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-12-2008, 09:38 PM
jdyche jdyche is offline
Junior Member
 
Join Date: Aug 2008
Posts: 1
jdyche is an unknown quantity at this point
Submit to Clesto Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq Submit to Spurl
Default Fix World Clock

I have been working on this code - trying to get the timezone changed.

I want to keep the local, eastern, ireland, germany. However, I want to change the baghdad to afghanistan.

Can anyone help?

JavaScript Code:
/ <TABLE style="PADDING-TOP: 8px" height=0 cellSpacing=0 cellPadding=0 width="100%"> <TBODY> <TR> <TD noWrap align=middle width="5%"><FONT color=#ffffff size=1>.</FONT></TD> <TD noWrap align=middle width="30%"><INPUT style="BORDER-RIGHT: #ffffff 0px solid; BORDER-TOP: #ffffff 0px solid; BORDER-LEFT: #ffffff 0px solid; BORDER-BOTTOM: #ffffff 0px solid; TEXT-ALIGN: center" size=8 value=16:01:13 name=local><BR><STRONG>Local Time</STRONG></TD> <TD noWrap align=middle width="30%"><INPUT style="BORDER-RIGHT: #ffffff 0px solid; BORDER-TOP: #ffffff 0px solid; BORDER-LEFT: #ffffff 0px solid; BORDER-BOTTOM: #ffffff 0px solid; TEXT-ALIGN: center" size=8 value=17:21:40 name=ftc><BR><STRONG>Eastern Time</STRONG></TD> <TD noWrap align=middle width="30%"><INPUT style="BORDER-RIGHT: #ffffff 0px solid; BORDER-TOP: #ffffff 0px solid; BORDER-LEFT: #ffffff 0px solid; BORDER-BOTTOM: #ffffff 0px solid; TEXT-ALIGN: center" size=8 value=21:21:40 name=wet><BR><STRONG>Shannon, Ireland</STRONG></TD> <TD noWrap align=middle width="30%"><INPUT style="BORDER-RIGHT: #ffffff 0px solid; BORDER-TOP: #ffffff 0px solid; BORDER-LEFT: #ffffff 0px solid; BORDER-BOTTOM: #ffffff 0px solid; TEXT-ALIGN: center" size=8 value=22:21:40 name=cet><BR><STRONG>Berlin, Germany</STRONG></TD> <TD noWrap align=middle width="30%"><INPUT style="BORDER-RIGHT: #ffffff 0px solid; BORDER-TOP: #ffffff 0px solid; BORDER-LEFT: #ffffff 0px solid; BORDER-BOTTOM: #ffffff 0px solid; TEXT-ALIGN: center" size=8 value=01:21:40 name=bag><BR><STRONG>Baghdad</STRONG></TD> <TD noWrap align=middle width="5%"><IMG id=HelpImage onmouseover="toggleClickWC('WorldClockHelp', this);" onmouseout="toggleClickWC('WorldClockHelp', this);" hspace=5 src="https://www.armyfrg.org/skins/ArmyFRG/resources/help.gif" align=absMiddle> <DIV class=Form-ErrorSummary id=WorldClockHelp style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; LEFT: 562px; VISIBILITY: hidden; PADDING-BOTTOM: 10px; PADDING-TOP: 10px; POSITION: absolute; TOP: 1918px" align=left>All times are in the 24-hour Military Clock Format<BR>(ie: 09:00 is 9:00am; 12:00 is noon; 13:00 is 1:00pm; <BR>17:00 is 5:00pm, etc). The times displayed above a world <BR>location is the local time in that particular <BR>area.</DIV></TD></TR></TBODY></TABLE> <SCRIPT language=JavaScript> function GetTime() { var dt = new Date(); var def = dt.getTimezoneOffset()/60; var gmt = (dt.getHours() + def); document.all.local.value = (IfZero(dt.getHours()) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds())); var ending = ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()); var ftc =check24(((gmt - 4) > 24) ? ((gmt - 4) - 24) : (gmt - 4)); document.all.ftc.value = (IfZero(ftc) + ending); var wet =check24(((gmt - 0) > 24) ? ((gmt - 0) - 24) : (gmt - 0)); document.all.wet.value = (IfZero(wet) + ending); var cet =check24(((gmt + 1) > 24) ? ((gmt + 1) - 24) : (gmt + 1)); document.all.cet.value = (IfZero(cet) + ending); var bag =check24(((gmt + 8) > 24) ? ((gmt + 8) - 24) : (gmt + 8)); document.all.bag.value = (IfZero(bag) + ending); setTimeout("GetTime()", 1000); } function IfZero(num) { return ((num <= 9) ? ("0" + num) : num); }/
Reply With Quote

This ad is part of our Revenue Sharing program
Reply


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Wordpress Theme - Medical World - FREE Download dpsubi1 General Web/Webmaster Forum 0 05-24-2008 06:39 PM
Publishing your website to the world wide web Laura-Jane General Web/Webmaster Forum 1 04-06-2007 06:13 PM


All times are GMT. The time now is 10:20 AM.


Creative Commons License
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30