thedestroyer Posted January 1, 2010 Posted January 1, 2010 Anyone got a basic clock for v2 that i can add to the mainmenu? I dont mean any flash clocks just text displaying the date and time thanks. Quote
iR00T Posted January 1, 2010 Posted January 1, 2010 Google>Javascript clocks or website clocks etc. You'll find something you like. Quote
thedestroyer Posted January 17, 2010 Author Posted January 17, 2010 I have tried all the ones i can find but i just get errors Quote
Zero-Affect Posted January 18, 2010 Posted January 18, 2010 this one is pretty cool, it's not a clock but it's better than the generic php time [lmgtfy]javascript server time clock[/lmgtfy] Second result down Quote from javascriptkit.com: <script type="text/javascript"> // Current Server Time script (SSI or PHP)- By JavaScriptKit.com ([url]http://www.javascriptkit.com[/url]) // For this and over 400+ free scripts, visit JavaScript Kit- [url]http://www.javascriptkit.com/[/url] // This notice must stay intact for use. //Depending on whether your page supports SSI (.shtml) or PHP (.php), UNCOMMENT the line below your page supports and COMMENT the one it does not: //Default is that SSI method is uncommented, and PHP is commented: var currenttime = '' //SSI method of getting server date //var currenttime = '<? print date("F d, Y H:i:s", time())?>' //PHP method of getting server date ///////////Stop editting here///////////////////////////////// var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December") var serverdate=new Date(currenttime) function padlength(what){ var output=(what.toString().length==1)? "0"+what : what return output } function displaytime(){ serverdate.setSeconds(serverdate.getSeconds()+1) var datestring=montharray[serverdate.getMonth()]+" "+padlength(serverdate.getDate())+", "+serverdate.getFullYear() var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds()) document.getElementById("servertime").innerHTML=datestring+" "+timestring } window.onload=function(){ setInterval("displaytime()", 1000) } </script> [b]Current Server Time:[/b] <span id="servertime"></span></p> <p style="font: normal 11px Arial">This free script provided by [url="http://www.javascriptkit.com"]JavaScript Kit[/url]</p> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.