1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: use put_time

This commit is contained in:
Zdenek Kabelac 2024-08-09 15:00:14 +02:00
parent a06a49b549
commit b4af2571db

View File

@ -319,12 +319,9 @@ struct Journal {
of << ru->second;
else {
struct tm time_info;
char buf[64];
time_t t = time( 0 );
if (localtime_r(&t, &time_info)) {
strftime(buf, sizeof(buf), "%F %T", &time_info);
of << "--- " << buf << " ---";
}
if (localtime_r(&t, &time_info))
of << "--- " << std::put_time( &time_info, "%F %T" ) << " ---";
}
of << std::endl;
}