Previous: ZD-Owner| Zot-Dispatch 2.0| Next: ZD-Method Substitution

Zot-Dispatch: Date and Time


If you'd like to have the date and/or time included in the response from a form, Zot-Dispatch accepts a hidden element named ZD-Date-Format whose value is a format string for the UNIX date command. Using this format string, Zot-Dispatch sets up an internal element by the name of ZD-Date which will be returned with the default response of which can be substituted into a template.

Zot-Dispatch assumes that the syntax of the date command on your system is date +FORMAT_STRING, but the particulars of the FORMAT_STRING depend on the version of the date program that exists on your system. Read the man pages for date on your system for more information.

Example:
The following form will print out the date and time that it was submitted using the format %B %d, %Y %I:%M %p.

  <FORM METHOD=POST ACTION="http://www.oac.uci.edu/cgi-bin/zd-2.0.cgi">
    <INPUT TYPE=hidden NAME=ZD-Date-Format VALUE="%B %d, %Y %I:%M %p">
    <INPUT TYPE=hidden NAME=ZD-Method VALUE="ZD-Reflect;;body:&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;Zot-Dispatch: ZD-Date Example&lt;/TITLE&gt;
&lt;/HEAD&gt;

&lt;BODY&gt;
&lt;H1&gt;ZD-Date Example&lt;/H1&gt;

The date and time is $ZD-Date#.

&lt;HR&gt;

&lt;A HREF=&quot;http://www.oac.uci.edu/X/W6/zd/2.0/ZD-2.0-Date.html#example1&quot;&gt;
Return to ZD-Date Document&lt;/A&gt;

&lt;/HTML&gt;
">
    <INPUT TYPE=submit VALUE="Submit Example">
  </FORM>
The hidden element named ZD-Date-Format above tells the date program to format the date/time string as Month Date, Year Hour:Minute AM/PM. ZD-Date is used to substitute the value of the date and time into the template shown above. Go ahead and try it out:

Previous: ZD-Owner| Zot-Dispatch 2.0| Next: ZD-Method Substitution
Zot-Dispatch 2.0
Written by Leonard Megliola III (lmegliol@uci.edu)
Last Revised 02 January 1996