aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
m---------commonlib0
-rw-r--r--perllib/Problems.pm6
2 files changed, 4 insertions, 2 deletions
diff --git a/commonlib b/commonlib
-Subproject b1db274c894f3ddce98632dc21f1d5649d749d8
+Subproject fdcc1684406365f94cc9beedc9c251343df7693
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;