date and time block?
c0mputerking - May 29, 2008 - 21:16
anyone know of a method to have drupal put the time in a block on the webpage could not find a module to achive this.
anyone know of a method to have drupal put the time in a block on the webpage could not find a module to achive this.
=-=
whos time ? a users time ? the admins time ? the servers time ?
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
I meant to add that bit time
I meant to add that bit time my post I think it would be best if i could get it to post server time? but options would be cool
Easy Way
The easy way is to simply switch the input format to PHP, and then do a
<?phpprint date("YMD");
?>
You can change "YMD" to whatever you would like. (http://www.php.net/date)
--matt
http://www.monarchdigital.com
where do i put that bit of
where do i put that bit of code in the tempate.php file??
I added it to my content and
I added it to my content and i works sort of i would like to have a running clock in a block somewhere not just a time and date that only loads when the page is refreshed. However it is cool that it works
found world clocl module but still not happy
found the world clock module but it uses my computers time i would like a clock to display the server time ie the time that drupal has.
=-=
plenty of clock scripts fopund using google. With a little work they can be incorporated into your drupal install.
maxxblade.co.uk/clock/ may suit your needs.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
I found a script that seems
I found a script that seems to do nicely here it is if anyone is interested grabs time from the server just what i wanted
// Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// 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)
}
MST
Worldclock module can
Worldclock module can display time in any Timezone you want. Just go to Worldclock settings page and pick up the one you want!
Cheers,
flevour
---------------------------
http://flevour.net