Revison Date/Time in Java Script

Sam A. Khosh-Khui 512/245-2288 SK03 at a1.swt.edu
Tue Jun 24 14:48:58 EDT 1997


        I have a problem with displaying the correct time/date in a Java 
        script.  I would appreciate it if someone out there would offer a 
        solution.  Here is the problem.
        
        I use the following Java script in an html file to display the 
        revision date:
        
            <SCRIPT LANGUAGE="JavaScript">
            <!--hide script from old browsers
            document.write("Last Updated: " + document.lastModified);
            // end hiding -->
            </script>
            
        I revised and saved the file on June 19th, 1997, at 1:54 p.m. 
        CST.  However, when I reload the file and viewed it in Netscape, 
        the revision date/time listed as:
        
            Jun 19 18:54:00 1997 
            
        I don't know how this 5 hour difference was added to the revision 
        date.
        
        1)  How do I eliminate the time element in revision date?
        2)  How do I display the correct date/time?
        3)  How do I reformat the existing revision date to: 6/19/97 or 
            June 19, 1997?
            
        Thanks in advance,
        
        Sam A. Khosh-khui
        E-mail: sk03 at swt.edu
        Alkek Library
        Southwest Texas State University
        
        
        


More information about the Web4lib mailing list