You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2006/04/29 18:05:21 UTC
svn commit: r398191 - in /spamassassin/trunk/masses/rule-qa:
automc/ruleqa.cgi corpus-hourly
Author: jm
Date: Sat Apr 29 09:05:20 2006
New Revision: 398191
URL: http://svn.apache.org/viewcvs?rev=398191&view=rev
Log:
re-align daterev strings so that they use a time much nearer the daily tag-time -- 0850 UTC -- instead of 0000 UTC as their boundary. This will allow zmi's mass-checks to fit into the same 'day' period
Modified:
spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi
spamassassin/trunk/masses/rule-qa/corpus-hourly
Modified: spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi?rev=398191&r1=398190&r2=398191&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi (original)
+++ spamassassin/trunk/masses/rule-qa/automc/ruleqa.cgi Sat Apr 29 09:05:20 2006
@@ -36,6 +36,12 @@
'OVERLAP.new' => 'set 0, overlaps between rules',
);
+# daterevs -- e.g. "20060429/r239832-r" -- are aligned to just before
+# the time of day when the mass-check tagging occurs; that's 0850 GMT,
+# so align the daterev to 0800 GMT.
+#
+use constant DATEREV_ADJ => - (8 * 60 * 60);
+
my $q = new CGI;
my $ttk = Template->new;
@@ -566,8 +572,10 @@
sub get_last_night_daterev {
# don't use a daterev after (now - 12 hours); that's too recent
- # to be "last night", for purposes of rule-update generation
- my $notafter = strftime "%Y%m%d", localtime time - (12*60*60);
+ # to be "last night", for purposes of rule-update generation.
+
+ my $notafter = strftime "%Y%m%d",
+ gmtime ((time + DATEREV_ADJ) - (12*60*60));
foreach my $dr (reverse @daterevs) {
my $t = get_daterev_description($dr);
Modified: spamassassin/trunk/masses/rule-qa/corpus-hourly
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/masses/rule-qa/corpus-hourly?rev=398191&r1=398190&r2=398191&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-qa/corpus-hourly (original)
+++ spamassassin/trunk/masses/rule-qa/corpus-hourly Sat Apr 29 09:05:20 2006
@@ -29,6 +29,12 @@
use constant WEEK => 60*60*24;
nice(15);
+# daterevs -- e.g. "20060429/r239832-r" -- are aligned to just before
+# the time of day when the mass-check tagging occurs; that's 0850 GMT,
+# so align the daterev to 0800 GMT.
+#
+use constant DATEREV_ADJ => - (8 * 60 * 60);
+
my $configuration = "$ENV{HOME}/.corpus";
my %opt;
my %revision = ();
@@ -440,7 +446,7 @@
sub mk_daterev {
my ($timet, $rev, $tag) = @_;
- return strftime("%Y%m%d", gmtime($timet)) . "/r$rev-$tag";
+ return strftime("%Y%m%d", gmtime($timet + DATEREV_ADJ)) . "/r$rev-$tag";
}
sub create_outputdir {