aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Problems.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/Problems.pm')
-rw-r--r--perllib/Problems.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perllib/Problems.pm b/perllib/Problems.pm
index c9caf41f2..69293e162 100644
--- a/perllib/Problems.pm
+++ b/perllib/Problems.pm
@@ -515,9 +515,10 @@ sub timeline_alerts {
if ($cobrand) {
$cobrand_clause = " and cobrand = '$cobrand'";
}
+ my $current_time = dbh()->selectrow_array('select ms_current_timestamp()');
my $alerts = select_all("select *,
extract(epoch from whensubscribed) as whensubscribed
- from alert where whensubscribed>=ms_current_timestamp()-'7 days'::interval
+ from alert where whensubscribed>='$current_time'-'7 days'::interval
and confirmed=1
$cobrand_clause");
return $alerts;
@@ -537,10 +538,11 @@ sub timeline_deleted_alerts {
$cobrand_clause = " and cobrand = '$cobrand'";
}
+ my $current_time = dbh()->selectrow_array('select ms_current_timestamp()');
my $alerts = select_all("select *,
extract(epoch from whensubscribed) as whensubscribed,
extract(epoch from whendisabled) as whendisabled
- from alert where whendisabled>=ms_current_timestamp()-'7 days'::interval
+ from alert where whendisabled>='$current_time'-'7 days'::interval
$cobrand_clause");
return $alerts;