I am attempting to write an application which will disable at some point and that i want that to occur using javascript. However, since people can certainly alter the date on their own computer, I had been wishing to make use of the date supplied by Apache because the comparison date. I attempted some simple stuff however the SSI echoed date wouldn't compare from the javascript date. My code is below. Any ideas?

var currenttime = '<!--#config timefmt="%a %b %d %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->'
var currenttime = currenttime+' GMT-0400 (EDT)';

var disableDate = new Date();
disableDate.setFullYear(2011,9,18);
disableDate.setHours(17,0,0,0);

if(disableDate < currenttime)
    $('#date_field').attr("disabled", true);

You're evaluating a string to some date. Convert your currenttime string right into a Date object first:

var currenttime = '<!--#config timefmt="%a %b %d %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" --> GMT-0400 (EDT)';
currenttime = new Date(currenttime);

Nevertheless, try rather to make use of conditional SSI to absolutely disable the shape server-side rather than getting JavaScript to get it done for you personally.

Generally, you do not need that whatsoever. Should you depend on JavaScript to disable any logic, expect your page to become saved to some disk, JavaScript required apart, and form posted whenever now or 2 yrs later.

What you need to concentrate on is "how do i deny processing this type at some point?Inch—and as you can tell, the question doesn't rely on user clocks anymore. Go server-side!

By JavaScript, utilize it just for user's convenience. All of the "security" rules are for server-side.