RE: SSI and Time Display

Hello Peter:

To modify the date format in SSI, you must execute a config statement, prior
to echoing the var.  Maybe something like this?

<!--#config timefmt="%A, %e-%b-%Y %I:%M %p %Z" -->
<!--#echo var="DATE_LOCAL" -->

You could use any of the Unix date variables.  For instance, you could use
simply %r to show the time o %x to show the date.

HTH,

Humberto


-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Peter Donahue
Sent: Saturday, July 26, 2008 5:14 PM
To: nfb-web@xxxxxxxxxx
Cc: blindwebbers@xxxxxxxxxxxxxxx; programmingblind@xxxxxxxxxxxxx
Subject: SSI and Time Display


Good afternoon everyone,

    I recently began using Server-Side Includes on one of the sites I
manage, but need to modify how the time is displayed. Below is the tag I
included on the site home page to display the current date and time to
visitors, but the time is given in Military format. Here is the SSI tag I
used:
 <!--#echo var="DATE_LOCAL" -->

    My next trick is to reformat the time so instead of the user seeing:
: Saturday, 26-Jul-2008 16:00:08 CDT.

    I want the line to read:
: Saturday, 26-Jul-2008 4:07:08 P.M. CDT

    If anyone has a modified version of this tag that will display the time
in the format I want I'll appreciate that a lot. I'd also like equivalent
tags in PHP as well. Thanks for your help.

Peter Donahue


"And when from bondage we're extricated. Our former memories will fade from
mind."
Morton Bay: As performed by John Denver

__________
View the list's information and change your settings at 
http://www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at 
http://www.freelists.org/list/programmingblind

Other related posts: