Fixed bug in javascript date to php.