Fix bug that was not converting dates properly in non-webkit browsers.