From b8270aad3f331b699f64acd1cd5797608d1a8550 Mon Sep 17 00:00:00 2001 From: Chaz Littlejohn Date: Fri, 8 Apr 2011 21:51:20 +0000 Subject: [PATCH] Bug fix - changed to datetime.datetime.utcnow() --- pyfpdb/fpdb_import.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index 3a48fd8c..6886eee4 100644 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -23,7 +23,6 @@ _ = L10n.get_translation() import os # todo: remove this once import_dir is in fpdb_import import sys from time import time, strftime, sleep, clock -from datetime import datetime import traceback import math import datetime @@ -169,12 +168,12 @@ class Importer: def logImport(self, type, file, stored, dups, partial, errs, ttime, id): hands = stored + dups + partial + errs - now = datetime.utcnow() + now = datetime.datetime.utcnow() ttime100 = ttime * 100 self.database.updateFile([type, now, now, hands, stored, dups, partial, errs, ttime100, True, id]) def addFileToList(self, file, site, filter): - now = datetime.utcnow() + now = datetime.datetime.utcnow() file = os.path.splitext(os.path.basename(file))[0] id = self.database.storeFile([file, site, now, now, 0, 0, 0, 0, 0, 0, False]) return [site] + [filter] + [id]