浏览代码

Fix datetime parsing logic

Jonas Borgström 14 年之前
父节点
当前提交
0f7d5a64a1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      darc/archive.py

+ 1 - 1
darc/archive.py

@@ -48,7 +48,7 @@ class Archive(object):
     def ts(self):
         """Timestamp of archive creation in UTC"""
         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):
         for id in self.metadata['chunks_ids']: