Write timestamp directly to output stream
This uses put_time (if supported) to avoid having to first write the timestamp to a temporary buffer and then copy it to the stream.
Merge pull request #262 from breyed/streamed-timestamp

Write timestamp directly to output stream