fixed date format bug and line ending problem.

Apple calendar can parse the output now.