]> sourceware.org Git - lvm2.git/commitdiff
Revert "tests: use put_time" 1407371944
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 9 Aug 2024 13:37:59 +0000 (15:37 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 9 Aug 2024 13:37:59 +0000 (15:37 +0200)
This reverts commit b4af2571dbee9dab5717bb166ed63df5ae63974b.
std::put_time is a relatively new feature so breaks builds on older
systems.

test/lib/brick-shelltest.h

index 1b65bd9eac1a2d33fce0e3cc22f50f356f1cd105..15e21cca74ec0c024499d5006620be19733466e9 100644 (file)
@@ -319,9 +319,12 @@ struct Journal {
                     of << ru->second;
                 else {
                     struct tm time_info;
+                    char buf[64];
                     time_t t = time( 0 );
-                    if (localtime_r(&t, &time_info))
-                        of << "--- " << std::put_time( &time_info, "%F %T" ) << " ---";
+                    if (localtime_r(&t, &time_info)) {
+                        strftime(buf, sizeof(buf), "%F %T", &time_info);
+                        of << "--- " << buf << " ---";
+                    }
                 }
                 of << std::endl;
             }
This page took 0.032592 seconds and 5 git commands to generate.