all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 2/2] statistics: use localized day span for spamscores
Date: Mon, 27 Mar 2023 16:53:55 +0200	[thread overview]
Message-ID: <20230327145355.444827-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20230327145355.444827-1-d.csapak@proxmox.com>

the total info we use is also the localized day span so we have to use
that here too. Alternatively, we could use the non localized one on
both.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/PMG/Statistic.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PMG/Statistic.pm b/src/PMG/Statistic.pm
index 99f96cf..024e550 100755
--- a/src/PMG/Statistic.pm
+++ b/src/PMG/Statistic.pm
@@ -428,7 +428,7 @@ sub total_mail_stat {
 
 sub total_spam_stat {
     my ($self, $rdb) = @_;
-    my ($from, $to) = $self->timespan();
+    my ($from, $to) = $self->localdayspan();
 
     my $sth = $rdb->{dbh}->prepare(
         "SELECT spamlevel, COUNT(spamlevel) AS count FROM CStatistic"
-- 
2.30.2





  reply	other threads:[~2023-03-27 14:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 14:53 [pmg-devel] [PATCH pmg-api 1/2] statistics: spamscores: fix total count when there is outgoing spam Dominik Csapak
2023-03-27 14:53 ` Dominik Csapak [this message]
2023-03-28  7:40   ` [pmg-devel] [PATCH pmg-api 2/2] statistics: use localized day span for spamscores Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230327145355.444827-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal