# HG changeset patch # User Julien Cristau # Date 1449665883 -3600 # Node ID 6ff786884aad721ac20d1207ccec2e5a6b1f2d59 # Parent 9e64fddebc89bc162b8cb9787745032f37e1e6b3 [hooks] fix timestamp confusion in TransactionsCleanupStartupHook transactions.tx_time is inserted as datetime.utcnow(), in server/sources/native.py:NativeSQLSource.start_undoable_transaction. Don't compare it to datetime.now(). diff -r 9e64fddebc89 -r 6ff786884aad hooks/__init__.py --- a/hooks/__init__.py Thu Dec 10 12:34:15 2015 +0100 +++ b/hooks/__init__.py Wed Dec 09 13:58:03 2015 +0100 @@ -33,7 +33,7 @@ # which may cause reloading pb lifetime = timedelta(days=self.repo.config['keep-transaction-lifetime']) def cleanup_old_transactions(repo=self.repo, lifetime=lifetime): - mindate = datetime.now() - lifetime + mindate = datetime.utcnow() - lifetime with repo.internal_cnx() as cnx: cnx.system_sql( 'DELETE FROM transactions WHERE tx_time < %(time)s',