forked from OSchip/llvm-project
Windows/TimeValue.inc: Mute prefixed '0' on %d to emulate %e.
It fixes compatibility in llvm/test/Object/archive-toc.test. llvm-svn: 186142
This commit is contained in:
parent
30d6865a23
commit
40bd28a7df
|
@ -49,6 +49,11 @@ std::string TimeValue::str() const {
|
|||
char Buffer[25];
|
||||
// FIXME: the windows version of strftime doesn't support %e
|
||||
strftime(Buffer, 25, "%b %d %H:%M %Y", LT);
|
||||
assert((Buffer[3] == ' ' && isdigit(Buffer[5]) && Buffer[6] == ' ') ||
|
||||
"Unexpected format in strftime()!");
|
||||
// Emulate %e on %d to mute '0'.
|
||||
if (Buffer[4] == '0')
|
||||
Buffer[4] = ' ';
|
||||
return std::string(Buffer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue