Preview:
http://celebrusisawesome.smfforfree.com/Has been tested on Firefox, Epiphany and Opera.
First ensure you have this in your headers:
<script src="/jquery.js" type="text/javascript"></script>
If you have that, proceed. If you don't, add it and return.
Then stick this in your footers:
<script type="text/javascript">
/**
* Auto-Update the Time
* http://aetus.net/
* http://revolutionx.smfforfree3.com/
*
* While there is NO warranty on this script unless you pay me a very large fee, I will *TRY*
* to the best of my ability to help you out.
*
* License: WTFPL (http://sam.zoy.org/wtfpl/)
*
* Feel free to remove this copyright notice, just visit those two sites listed above.
* Thanks for using this script.
*
*/
function getTimeString() {
var t = new Date();
var months = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July',
'August', 'September', 'October', 'November', 'December' ];
var month = months[t.getMonth()];
var date = t.getDate();
var year = t.getFullYear();
var hour = t.getHours();
var suffix = "am";
if (hour >= 12) {
suffix = "pm";
hour = (hour == 12) ? "12" : hour - 12;
}
if(hour < 10) { hour = "0" + hour; }
var minute = t.getMinutes();
if(minute < 10) { minute = "0" + minute; }
var second = t.getSeconds();
if(second < 10) { second = "0" + second; }
return month + " " + date + ", " + year + ", " + hour + ":" + minute + ":" + second + " " + suffix;
}
function updateTheDate($) {
var timeString = getTimeString();
var timeDisplay = $("div.tborder table tbody tr td.titlebg2 span.smalltext:contains(pm)");
if(timeDisplay.length === 0) {
timeDisplay = $("div.tborder table tbody tr td.titlebg2 span.smalltext:contains(am)");
}
timeDisplay.html(timeString);
}
setInterval("updateTheDate(jQuery)", 1000);
</script>
And voila, you now have a clock that shows the time *right now*, not when the page was loaded. And the time is from the user's computer, so you (and your members) don't have to mess with time offsets.