]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/utime: don't pass %z to utime if there is a 'Z' 28326/head
authorSage Weil <sage@redhat.com>
Fri, 24 May 2019 22:09:53 +0000 (17:09 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 30 May 2019 15:18:05 +0000 (11:18 -0400)
This fails on centos 7 for some reason.

If it's UTC, we don't need to parse the tz portion, so avoid the issue by
leaving the %z out of the fmt string.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 1d1c4782eea1fac0e9230ed5ac32b19517fdd616)

src/include/utime.h

index d1c5208ec0a58d02c23d09080c0b81ac00f3604a..41d0a089a5638e390bb011489a39adb0949da377 100644 (file)
@@ -407,7 +407,7 @@ public:
          }
        }
        // look for tz...
-       if (*q == '-' || *q == '+' || *q == 'Z') {
+       if (*q == '-' || *q == '+') {
          *q = '%';
          *(q+1) = 'z';
          *(q+2) = 0;