Commit 9b549d11 authored by Jérome Perrin's avatar Jérome Perrin

administration: fix incremental consistency check for non UTC timezone

When zope does not run in a UTC timezone,
last_active_process.getStartDate will be in local timezone.

If we just cast this to string and compare it against
indexation_timestamp which is UTC in our case (because we don't use SET
time_zone statement), we'll convert two dates in different timezone,
which practically in this case can lead to not checking some documents
or checking documents twice.
parent 9d662be3
......@@ -3,7 +3,10 @@ kw = {}
if context.getProperty('incremental_check'):
last_active_process = context.getLastActiveProcess()
if last_active_process is not None:
kw['indexation_timestamp'] = '>= %s' % last_active_process.getStartDate().ISO()
kw['indexation_timestamp'] = {
'query': last_active_process.getStartDate(),
'range': '>='
}
active_process = context.newActiveProcess().getRelativeUrl()
query_string = context.getProperty('catalog_query_string', '')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment