Re: Time script needed
by Mike Schienle <mgs(at)ivsoftware.com>
|
Date: |
Mon, 13 Mar 2000 07:06:56 -0800 |
To: |
"Tom Keatley" <tom(at)piedpiper.com.au>, <hwg-basics(at)hwg.org> |
References: |
net Toms |
|
todo: View
Thread,
Original
|
|
At 5:46 PM +0800 03/13/00, Tom Keatley wrote:
>Hi all .....
>
>I have been on the lookout for a small script to show the time as part of
>the text on a page ...there are lots of scripts around that will show the
>time in a text box but I have yet to find one that will actually become part
>of the text of a page and update in real time. I would like the time also to
>come from my server (most of them appear to use the surfers computer time).
>
>Is this possible?
With Server Side Includes it's easy. Here's all you need:
<!--#echo var="DATE_LOCAL" -->
Which will print:
Monday, 13-Mar-2000 7:03:17 PST
Here's a snippet from one of my sites:
<FONT COLOR="#999999"><B>
<!--#config timefmt="%D"-->
<!--#echo var="DOCUMENT_NAME"--> was last updated on
<!--#echo var="LAST_MODIFIED"-->
</B></FONT>
The FONT's should be obvious, just included for HTML context here.
The timefmt follows UNIX date command options. Ask and I'll provide
info, or just type "man date" or "man strftime" on a UNIX system. The
DOCUMENT_NAME displays the name of the current document. The
LAST_MODIFIED displays the time (in the timefmt style) of the last
modification.
The output from my index.html file will be:
index.html was last updated on 02/28/00
--
Mike Schienle Interactive Visuals, Inc.
mgs(at)ivsoftware.com Remote Sensing and Image Processing
http://www.ivsoftware.com/ Analysis and Application Development
HTML Guild: hwg-basics mailing list archives,
maintained by Web Professionals @ IWA