]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/ssh: parse new datetime
authorSage Weil <sage@redhat.com>
Tue, 30 Apr 2019 14:15:39 +0000 (09:15 -0500)
committerSage Weil <sage@redhat.com>
Wed, 29 May 2019 19:12:15 +0000 (14:12 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/ssh/module.py

index b6ebad6e5ed7aedfb12549421c4214d8e1dd7c4b..1fef4c8b1fd8d7dd32c0a12becbcacab480334c0 100644 (file)
@@ -18,7 +18,7 @@ except ImportError as e:
     remoto = None
     remoto_import_error = str(e)
 
-DATEFMT = '%Y-%m-%d %H:%M:%S.%f'
+DATEFMT = '%Y-%m-%dT%H:%M:%S.%f%z'
 
 # high-level TODO:
 #  - bring over some of the protections from ceph-deploy that guard against
@@ -183,8 +183,6 @@ class SSHOrchestrator(MgrModule, orchestrator.Orchestrator):
 
     @staticmethod
     def time_from_string(timestr):
-        # drop the 'Z' timezone indication, it's always UTC
-        timestr = timestr.rstrip('Z')
         return datetime.datetime.strptime(timestr, DATEFMT)
 
     def _get_cluster_fsid(self):