I need to dictate what time it is. It seems that .getHours uses the users system time. What if I need to set this to a certain timezone? I can't find anything in the documentation on setting the default timezone.
I have a delivery script for a site in Chicago, and currently if someone orders on the west coast they can inadvertently game the system and the 12 noon delivery cut off for next day delivery.
EDIT: So I found this:
$(document).ready(function(){
var timezone = "Europe/Berlin";
$.getJSON("http://json-time.appspot.com/time.json?tz="+timezone+"&callback=?",
function(data){
if (data.hour < 12) {
alert ("Good morning in "+timezone);
} else {
alert ("Good afternoon in "+timezone);
}
})
});
from here: How can I obtain the local time in jQuery?
Not sure where to take this with the time validation though....