Date & Time Testing Page


There are various commands for getting date & time using html and SSI/shtml.

The commands don't all work the same way and which one you should use depends sometimes on the way they work.

Date & Time Commands:

  1. Date & time: date & time: Which is online and just works.

  2. Date & Time from intrinsic Server Side Includes (SSI/shtml):

    These give the date & time of the source server, not the receiving server.

    The reference is SSI: Dates and Times.

    Commands:

    1. General format which is quite inflexible is:
              <!--#config timefmt="--"--><!--#echo var="DATE_LOCAL"-->
            
      The codes for timefmt are given by SSI: Dates and Times.

    2. For year:
              <!--#config timefmt="%Y"--><--#echo var="DATE_LOCAL"-->
            
      to get year .

      The version linked to this page is .

      The version linked to the current Wikipedia year page is---well it would be if this were an SSI page---all one gets here is: "> .

    3. For full date and time:
               <!--#config timefmt="%Y %B %d, %A, %I:%M:%S:%p" --><!--#echo var="DATE_LOCAL" -->
            
      to get---nix without an SSI page: .

      The version linked to this page is---nix without an SSI page: .

    The intrinsic SSI/shtml date & times can be used as parameters in html/shtml commands unlike the JavaScript commands.

  3. Creamer: Date from a JavaScript command that I downloaded from Kevin J.T. Creamer: https://facultystaff.richmond.edu/~creamer/web/js/date.html:

    The original JavaScript command is JavaScript: Today's Date.

    This JavaScript command is the best one I've found. I've modified it slightly---after much imprecation because of the unforgiving syntax. The modified script is in date_creamer.html.

    The SSI (shtml) command is

       <!--#include virtual="/~jeffery/astro/date/date_creamer.html"-->
       
    which gives what is seen at date_creamer.html. Space/No space? There is a forced space at the end of the date result.

    The command is linked to this page. The result is for the receiving server.???

    The JavaScript div insert does NOT work!!!!

  4. Time only on 24-hour clock from JavaScript command I downloaded from somewhere: date_time_only_24h.html.

    The command is

     
       <!--#include virtual="/~jeffery/astro/date/date_time_only_24h.html"-->
       
    which gives---nix without an SSI page , which is linked to this page. The result is for the receiving server.

    The original JavaScript script came from somewhere. I've lost track of it. It has not been modified.

  5. Time only with continuous updating from a JavaScript command I downloaded from Chirag S. Khatri: Current Running Time with Javascript: date_time_only_khatri.html.

    The command is

       <!--#include virtual="/~jeffery/astro/date/date_time_only_khatri.html"-->
       
    which gives---nix without an SSI page: , which is linked to this page. The result is for the receiving server.

    A second call in the same page gives ????. Nothing. The Khatri JavaScript command works once only per page. It's a bug, not a feature.

    The original JavaScript script came from Chirag S Khatri. It has not been modified.

  6. Some variations on the above commands:

    1. date_time_creamer_24h.html: .
    2. date_year_creamer.html.
    3. date_time_creamer_khatri.html: .