Use a better format for writing dates so they sort correctly