]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/utime: don't pass %z to utime if there is a 'Z' 28325/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:06:45 +0000 (11:06 -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 b017203acb82ebff5188a45a458166b7bc130caa..42f9b08706c2a51103627f037f51a949064f7644 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;