found problem, attempt solution

problem was that the javascript date was incorrect, i suspect this
requires a more appropriate date constructor