Fix the format and the date exposed in the patch output

With these changes ``git am`` works out of the box