From eaab5e9b44a0b26727d7a1b6ec21f3b002626995 Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 11 Jun 2010 17:59:55 +0000 Subject: Use last seen ebuild time instead of NOW() in newebuilds query --- gentoobrowse/views/newebuilds.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gentoobrowse/views/newebuilds.xml b/gentoobrowse/views/newebuilds.xml index 0ba5886..46a64f9 100644 --- a/gentoobrowse/views/newebuilds.xml +++ b/gentoobrowse/views/newebuilds.xml @@ -3,13 +3,13 @@ - SELECT filename, EXTRACT('day' FROM NOW()) - EXTRACT('day' FROM f.firstseen) AS age, description, - moddate, p.name AS pkgname, c.name AS catname + SELECT filename, description, moddate, p.name AS pkgname, c.name AS catname, + EXTRACT('day' FROM (SELECT MAX(fm.firstseen) FROM files fm)) - EXTRACT('day' FROM f.firstseen) AS age FROM ebuilds e, files f, packages p, categories c WHERE e.ebuildid = f.fileid AND e.packageid = p.packageid AND p.categoryid = c.categoryid - AND f.firstseen > DATE_TRUNC('day', NOW()) - INTERVAL '3 days' + AND f.firstseen > (SELECT MAX(fm.firstseen) - INTERVAL '2.1 days' FROM files fm) ORDER BY c.name, p.name, e.versioninst -- cgit v1.2.3