Browse Source

Fix datetime parsing logic

Jonas Borgström 14 years ago
parent
commit
0f7d5a64a1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      darc/archive.py

+ 1 - 1
darc/archive.py

@@ -48,7 +48,7 @@ class Archive(object):
     def ts(self):
     def ts(self):
         """Timestamp of archive creation in UTC"""
         """Timestamp of archive creation in UTC"""
         t, f = self.metadata['time'].split('.', 1)
         t, f = self.metadata['time'].split('.', 1)
-        return datetime.strptime(t, '%Y-%m-%dT%H:%M:%S') + timedelta(int(f) / 100)
+        return datetime.strptime(t, '%Y-%m-%dT%H:%M:%S') + timedelta(seconds=float('.' + f))
 
 
     def get_chunks(self):
     def get_chunks(self):
         for id in self.metadata['chunks_ids']:
         for id in self.metadata['chunks_ids']: