Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Date/Time on Sites

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  NT4 host required  
Author Message
jonathan

External


Since: Dec 13, 2003
Posts: 3



(Msg. 1) Posted: Tue Dec 16, 2003 5:13 pm
Post subject: Date/Time on Sites
Archived from groups: alt>www>webmaster (more info?)

Hi, can someone please advise where I can find out how to get an applet or
something that can put the time and date on my site. Thanks

 >> Stay informed about: Date/Time on Sites 
Back to top
Login to vote
sp_bhuisman

External


Since: Jun 27, 2003
Posts: 571



(Msg. 2) Posted: Tue Dec 16, 2003 5:13 pm
Post subject: Re: Date/Time on Sites [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 16 Dec 2003 14:13:21 +0000 (UTC), <Jonathan DeleteThis @arcadiac.com> wrote:

 > Hi, can someone please advise where I can find out how to get an applet
 > or
 > something that can put the time and date on my site. Thanks

I already *know* the time. You don't need to tell me again.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com" target="_blank">http://www.greywyvern.com</a> - Orca RingMaker: PHP web ring creation and
management<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Date/Time on Sites 
Back to top
Login to vote
user109

External


Since: Jul 01, 2003
Posts: 121



(Msg. 3) Posted: Tue Dec 16, 2003 5:15 pm
Post subject: Re: Date/Time on Sites [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

<Jonathan RemoveThis @arcadiac.com> wrote:

 > Hi, can someone please advise where I can find out how to get an
 > applet or something that can put the time and date on my site. Thanks

You could use Javascript, but really, most users should be able to tell
time by themselves.

--
Farlo, the Urban Fey Dragon<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Date/Time on Sites 
Back to top
Login to vote
someone4

External


Since: Dec 16, 2003
Posts: 3



(Msg. 4) Posted: Tue Dec 16, 2003 5:45 pm
Post subject: Re: Date/Time on Sites [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The problem is that some questions are too simple to answer ;0)

If you must put the date/time on your website, visit <a style='text-decoration: underline;' href="http://www.dynamicdrive.com" target="_blank">www.dynamicdrive.com</a>
and look in the Date & Time section - you'll find more stuff in there than
you need.


<Jonathan.TakeThisOut@arcadiac.com> wrote in message
news:brn3u1$fe2$1@sparta.btinternet.com...
 > Hi, can someone please advise where I can find out how to get an applet
or
 > something that can put the time and date on my site. Thanks
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Date/Time on Sites 
Back to top
Login to vote
www

External


Since: Jun 29, 2003
Posts: 720



(Msg. 5) Posted: Tue Dec 16, 2003 9:56 pm
Post subject: Re: Date/Time on Sites [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 16 Dec 2003 14:13:21 +0000 (UTC) <Jonathan DeleteThis @arcadiac.com>
broke off from drinking a cup of tea at BT Openworld to write:

 >Hi, can someone please advise where I can find out how to get an applet or
 >something that can put the time and date on my site. Thanks
 >
 >

This is one from Namowebeditor using Javascript:



<html>

<head>
<title>No title</title>
<meta name="generator" content="Namo WebEditor v5.0">
<script language="JavaScript">
<!--
function namosw_init_clock()
{
var type, i, top, obj, clocks;
clocks = new Array();
for (i = 0, top = 0; i < namosw_init_clock.arguments.length; i += 2)
{
obj = eval('document.'+namosw_init_clock.arguments[i]);
if (obj == null) continue;
if ((type = namosw_init_clock.arguments[i+1]) < 1 && 11 < type)
continue;
clocks[top++] = obj;
clocks[top++] = type;
}
clocks.months = new Array('January', 'February', 'March', 'April',
'May', 'June', 'July',
'August', 'September', 'October',
'November', 'December');
clocks.days = new Array('Sunday', 'Monday', 'Tuesday',
'Wednesday',
'Thursday', 'Friday', 'Saturday');
clocks.k_days = new Array('ÀÏ', '¿ù', 'È­', '¼ö', '¸ñ', '±Ý', 'Åä');
clocks.ampm_str = new Array('AM', 'PM');
clocks.k_ampm_str = new Array('¿ÀÀü', '¿ÀÈÄ');

if (top > 0) {
document.namosw_clocks = clocks;
namosw_clock();
}
}

function namosw_clock()
{
var i, type, clocks, next_call, str, hour, ampm, now, year2, year4;
clocks = document.namosw_clocks;
if (clocks == null) return;
next_call = false;
for (i = 0; i < clocks.length; i += 2) {
obj = clocks[i];
type = clocks[i+1];
now = new Date();
year2 = now.getYear();
year4 = year2;
if (year2 < 1000) year4 = 1900 + year2;
if (year2 >= 100) year2 = year4;

if (type == 1 || type == 2) {
obj.value = clocks.months[now.getMonth()] + ' ' + now.getDate()
+ ', ' + year4;
if (type == 2)
obj.value = clocks.days[now.getDay()] + ', ' + obj.value;
} else if (type == 3 || type == 4) {
obj.value = year2 + '/' + (now.getMonth()+1) + '/' +
now.getDate();
} else if (type == 5 || type == 6) {
obj.value = now.getDate() + '/' + (now.getMonth()+1) + '/' +
year2;
} else if (type == 8 || type == 9 || type == 10 || type == 11) {
obj.value = year4 + '³â ' + (now.getMonth()+1) + '¿ù ' +
now.getDate() + 'ÀÏ';
if (type == 9)
obj.value += ' ' + clocks.k_days[now.getDay()] + '¿äÀÏ';
}
if (type == 4 || type == 6 || type == 7 || type == 10 || type ==
11) {
hour = now.getHours();
ampm = 0;
if (hour >= 12) {
  if (hour > 12) hour -= 12;
  ampm = 1;
}
if (type == 10 || type == 11) {
  str = clocks.k_ampm_str[ampm] +' '+ hour+'½Ã '+
now.getMinutes() +'ºÐ';
  if (type == 11) str += ' ' + now.getSeconds() +'ÃÊ';
} else {
  str = hour +':'+ ((now.getMinutes() < 10) ?
'0'+now.getMinutes():now.getMinutes()) +':'+ ((now.getSeconds() < 10)
? '0'+now.getSeconds():now.getSeconds()) +' '+ clocks.ampm_str[ampm];
}
if (type == 7) obj.value = str;
else obj.value += ' ' + str;
}
if (type == 4 || type == 6 || type == 7 || type == 10 || type ==
11)
next_call = true;
}
if (next_call)
window.setTimeout("namosw_clock();", 1000);
}

// -->
</script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="purple"
alink="red" OnLoad="namosw_init_clock('form1.textclock1', 2)">
<form name="form1">
<p><input type="text" name="textclock1" size="40"></p>
</form>
<p> </p>
</body>

</html>


Or, you can use a search engine to search for "javascript" or
"applets" to find more.

Regards

Matt
--
The Probert Encyclopaedia
Free, extensive, searchable and illustrated
<a style='text-decoration: underline;' href="http://www.probertencyclopaedia.com" target="_blank">http://www.probertencyclopaedia.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Date/Time on Sites 
Back to top
Login to vote
user318

External


Since: Nov 28, 2003
Posts: 50



(Msg. 6) Posted: Wed Dec 17, 2003 1:39 am
Post subject: Re: Date/Time on Sites [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

<Jonathan RemoveThis @arcadiac.com> wrote in
news:brn3u1$fe2$1@sparta.btinternet.com:

 > Hi, can someone please advise where I can find out how to get an
 > applet or something that can put the time and date on my site. Thanks

This will put the date at the top right of your page.

<html><head>
<script type="text/javascript" language="JavaScript">
function WriteDate(){
var today = new Date();
thedate.innerText = today.toString();
}
</script>
<title>Date and time</title>
</head>
<body onload="WriteDate();">
<p align="right" id="thedate">Can't show the date, javascript disabled</p>
</body></html>

--
News Updater, No cgi-bin or database needed
<a style='text-decoration: underline;' href="http://www.xmlssoftware.com/NUpdater" target="_blank">http://www.xmlssoftware.com/NUpdater</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Date/Time on Sites 
Back to top
Login to vote
brucie011

External


Since: Nov 28, 2003
Posts: 133



(Msg. 7) Posted: Wed Dec 17, 2003 4:10 am
Post subject: Re: Date/Time on Sites [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in post <news:brn3u1$fe2$1@sparta.btinternet.com>
<Jonathan RemoveThis @arcadiac.com> said:

 > Hi, can someone please advise where I can find out how to get an applet or
 > something that can put the time and date on my site. Thanks

the visitors time? your server time? or your time?

your visitor will already have some idea what their time is so its
pointless having their time displayed.

the visitor probably isn't interested in the server time but it may be
the same as your time so you could use a bit of php like this:

<?echo date ("l dS of F Y. h:ia T");?>

will show something like:

Wednesday 17th of December 2003. 12:15am E. Australia Standard Time

if your server time is different from your time (you may be in different
time zones) then you need to make some adjustments.

the timestamp value of an hour is 3600 so if we want a time 2hrs in
front of the server time you would use a timestamp of 7200.

$timedifference=7200;

<?echo date ("l dS of F Y. h:ia T",time()+$timedifference);?>

will show something like:

Wednesday 17th of December 2003. 02:15am E. Australia Standard Time

--
brucie
17/December/2003 12:15:28 am kilo<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Date/Time on Sites 
Back to top
Login to vote
spam7

External


Since: Dec 05, 2003
Posts: 33



(Msg. 8) Posted: Wed Dec 17, 2003 4:10 am
Post subject: Re: Date/Time on Sites [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

While sitting in a puddle brucie scribbled in the mud:

 > in post <news:brn3u1$fe2$1@sparta.btinternet.com>
 > <Jonathan.RemoveThis@arcadiac.com> said:
 >
  >> Hi, can someone please advise where I can find out how to get an
  >> applet or something that can put the time and date on my site.
  >> Thanks
 >
 > the visitors time? your server time? or your time?
 >
 > your visitor will already have some idea what their time is so its
 > pointless having their time displayed.
 >
 > the visitor probably isn't interested in the server time but it may be
 > the same as your time so you could use a bit of php like this:
 >
 > <?echo date ("l dS of F Y. h:ia T");?>
 >
 > will show something like:
 >
 > Wednesday 17th of December 2003. 12:15am E. Australia Standard Time
 >
 > if your server time is different from your time (you may be in
 > different time zones) then you need to make some adjustments.
 >
 > the timestamp value of an hour is 3600 so if we want a time 2hrs in
 > front of the server time you would use a timestamp of 7200.
 >
 > $timedifference=7200;
 >
 > <?echo date ("l dS of F Y. h:ia T",time()+$timedifference);?>
 >
 > will show something like:
 >
 > Wednesday 17th of December 2003. 02:15am E. Australia Standard Time
 >

Gee, no js. Can't even turn it off. Sad

--
Duende
Today I will engage my dynamic perfection<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Date/Time on Sites 
Back to top
Login to vote
brucie011

External


Since: Nov 28, 2003
Posts: 133



(Msg. 9) Posted: Wed Dec 17, 2003 10:23 am
Post subject: Re: Date/Time on Sites [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in post <news:Xns945379F76A616spamwipkipbiz@130.133.1.4>
Wipkip said:

 > Gee, no js. Can't even turn it off. Sad

i'll try harder next time mommy!

--
brucie
17/December/2003 07:19:14 am kilo<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Date/Time on Sites 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
date ORDER BY - Hi, I'm currently running a sql select statement on a date field which is ordered by the date field in ascending order. It worked fine for the 1st to the 9th of the month but when it output 10th, 11th, 12th etc. it put them before the 1st. So I was..

Down-time - internic.net Don't they know we're trying to run a business here? "The whois server for .COM/.NET is not responding." ouch! -- William Tasso

time of day access - id like to make the high bandwidth demand sections of my website available only during off-peak hours. id like to accomplish this other than using drive share properties because i wont have root drive access when im remote. setup is both on win 2k serve...

Time out problems - Hi Guys Please believe me when I say this isn't an excuse to look at a site I have done. I'm getting a real ear-bashing from visitors to my client's site with regard to speed and time out problems. I've tried testing the site at various times on ADSL....

Pre launch program great time to get in - We would like to offer you a unique opportunity to make money from the traffic of your website and your contacts! Our new service, TopSalesGroup has started its AFFILIATE program. Please visit TopSalesGroup via this link:..
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]