Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2009-01-11 14:10:49 (GMT)
committer Tomeu Vizoso <tomeu@sugarlabs.org>2009-01-11 14:10:49 (GMT)
commitd10185d6a1f0953dec3260e3771af1d538c68d85 (patch)
tree3a5b0b92bc1a3ba25cbd59dbee83545d389acc72
parent5bd7ad2b1217781d9fbf729fe63685ed416b2cd2 (diff)
Drop mtime hack, journal will always filter by timestamp from now on
-rw-r--r--src/olpc/datastore/indexstore.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/olpc/datastore/indexstore.py b/src/olpc/datastore/indexstore.py
index 849c068..856b7d9 100644
--- a/src/olpc/datastore/indexstore.py
+++ b/src/olpc/datastore/indexstore.py
@@ -168,7 +168,6 @@ class IndexStore(object):
queries.append(query)
- self._replace_mtime(query_dict)
timestamp = query_dict.pop('timestamp', None)
if timestamp is not None:
start = str(timestamp.pop('start', 0))
@@ -209,22 +208,6 @@ class IndexStore(object):
return Query(Query.OP_AND, queries)
- def _replace_mtime(self, query):
- # TODO: Just a hack for the current journal that filters by mtime
- DATE_FORMAT = '%Y-%m-%dT%H:%M:%S'
- if query.has_key('mtime'):
- mtime_range = query.pop('mtime')
-
- start = mtime_range['start'][:-7]
- start = time.mktime(time.strptime(start, DATE_FORMAT))
-
- end = mtime_range['end'][:-7]
- # FIXME: this will give an unexpected result if the journal is in a
- # different timezone
- end = time.mktime(time.strptime(end, DATE_FORMAT))
-
- query['timestamp'] = {'start': int(start), 'end': int(end)}
-
def delete(self, uid):
self._database.delete_document(_PREFIX_UID + uid)