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.

=-=

VeryMisunderstood - May 29, 2008 - 21:25

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

c0mputerking - May 29, 2008 - 21:48

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

ultimateboy - May 29, 2008 - 22:05

The easy way is to simply switch the input format to PHP, and then do a

<?php
print 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

c0mputerking - May 30, 2008 - 04:55

where do i put that bit of code in the tempate.php file??

I added it to my content and

c0mputerking - May 30, 2008 - 05:00

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

c0mputerking - May 30, 2008 - 06:58

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.

=-=

VeryMisunderstood - May 30, 2008 - 11:36

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

c0mputerking - June 1, 2008 - 01:19

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

flevour - December 3, 2008 - 15:59

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

 
 

Drupal is a registered trademark of Dries Buytaert.