Click to See Complete Forum and Search --> : Time on a Page


Darren
12-28-2004, 08:57 AM
A mate of mine wants a the time to show on his website, but not use any of those JavaScript things that relies on the users time.

He would like it as here: http://www.setrains.co.uk/ in the top right, does anyone have an scripts/links to sites that can show how such thing is done.

Many thanks for any help.

baseiber
12-28-2004, 09:14 AM
You could use a server side script such as ASP. But you would have see if your server supports it.

TheBearMay
12-28-2004, 09:15 AM
Looks like that site used a server side include.

If you want to manipulate the date/time you could assign it to a JS variable thusly:

var GMTDate = '<!--#echo var="DATE_GMT"-->'
var ServerDate = '<!--#echo var="DATE_LOCAL"-->'


or if you want to just include it:


<!--#config timefmt="%A %B %d, %Y" -->
<!--#echo var="DATE_GMT"-->
<!--#echo var="DATE_LOCAL"-->


This page will give you an idea of how the timefmt string works:
http://www.htmlgoodies.com/beyond/ssi_datesandtimes.html