From 0eb0c88d3db83bc46a47d0a8cd30273514432e91 Mon Sep 17 00:00:00 2001 From: Daniel Quinn Date: Sat, 23 Jan 2016 03:22:15 +0000 Subject: [PATCH] Now the exporter sets the proper dates --- src/documents/management/commands/document_exporter.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/documents/management/commands/document_exporter.py b/src/documents/management/commands/document_exporter.py index 6e858e7ec..616605883 100644 --- a/src/documents/management/commands/document_exporter.py +++ b/src/documents/management/commands/document_exporter.py @@ -48,10 +48,8 @@ class Command(BaseCommand): with open(target, "wb") as f: f.write(GnuPG.decrypted(document.pdf)) - os.utime(target, times=( - int(time.mktime(document.created.timetuple())), - int(time.mktime(document.modified.timetuple())) - )) + t = int(time.mktime(document.created.timetuple())) + os.utime(target, times=(t, t)) def _render(self, text, verbosity): if self.verbosity >= verbosity: