]> git.phdru.name Git - bookmarks_db.git/blobdiff - Writers/bkmk_wflad.py
2039!
[bookmarks_db.git] / Writers / bkmk_wflad.py
index a4e88fcb7c9cd27d8fb9f2283cf47ca7ece4dcff..a82c52ca586244e7024bc18ede089afb775d5ab8 100644 (file)
@@ -18,8 +18,13 @@ from bkmk_objects import Writer
 
 
 def strftime(s):
+   if s is None:
+      return s
+   n = int(s)
+   if n > 10**10:
+      n /= 10**6
    try:
-      return time.strftime("%a %d %b %Y %T", time.localtime(int(s)))
+      return time.strftime("%a %d %b %Y %T", time.localtime(n))
    except (TypeError, ValueError): # s is None or is already formatted
       return s
 
@@ -38,7 +43,7 @@ Folder: %s
 AddDate: %s
 Comment: %s
 LastModified: %s
-""" % (level, f.name, strftime(f.add_date), f.comment, f.last_modified or ''))
+""" % (level, f.name, strftime(f.add_date), f.comment, strftime(f.last_modified)))
 
    def bookmark(self, b, level):
       self.outfile.write("""