Remove extraneous characters when printing the timestamp for an XCOFF object file.
authorzhijian <zhijian@ca.ibm.com>
Fri, 3 Mar 2023 18:18:58 +0000 (13:18 -0500)
committerzhijian <zhijian@ca.ibm.com>
Fri, 3 Mar 2023 18:18:58 +0000 (13:18 -0500)
commite16713d8772bf77d1a41c65cb69ee93e6bd47798
tree55f49fbb83701bd55c8d9ead2c8bd5b26d4f13a9
parentc65fb80b73aa5087a4bba79e61d96b4d652e1b54
Remove extraneous characters when printing the timestamp for an XCOFF object file.

Summary:

The llvm-readobj prints extra characters for the timestamp when --file-headers is used with an XCOFF file. This change updates the format string used to print the time. In addition, the timestamp is printed in the local timezone, and a thread-safe call is used to convert the time.

Summit the patch on behalf of Stephen Peckham.

Reviewers: James Henderson, Digger Lin
Differential Revision: https://reviews.llvm.org/D144281
llvm/test/tools/llvm-readobj/XCOFF/file-header.test
llvm/tools/llvm-readobj/XCOFFDumper.cpp