Use javascript date object to avoid timezone problems