Fix a race with use of non-reentrant localtime
Fix a race with use of non-reentrant localtime

localtime() uses a global buffer for its result. If multiple
threads called it at the same time, they could overwrite each
other and print out incorrect times.

This bug was caught by the clang thread sanitizer.

Change-Id: If48ef8d0ef5580b2cf693ce510a5353e7772eeee
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1187
Tested-by: Henry Robinson <3eca10f30041813f045165784e24b5a950a6cc7e@cloudera.com>
Reviewed-by: Henry Robinson <3eca10f30041813f045165784e24b5a950a6cc7e@cloudera.com>

danburkert/squeasel,danburkert/squeasel,danburkert/squeasel,brockn/squeasel,danburkert/squeasel,brockn/squeasel,danburkert/squeasel,brockn/squeasel,brockn/squeasel,danburkert/squeasel,brockn/squeasel,brockn/squeasel