aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/zurich-overdue-alert4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/zurich-overdue-alert b/bin/zurich-overdue-alert
index 4e81b3263..e7c23b493 100755
--- a/bin/zurich-overdue-alert
+++ b/bin/zurich-overdue-alert
@@ -29,10 +29,12 @@ loop_through( 'alert-overdue.txt', 0, 6, ['confirmed', 'planned'] );
sub loop_through {
my ( $template, $include_parent, $days, $states ) = @_;
+ my $dtf = FixMyStreet::App->model("DB")->storage->datetime_parser;
+ my $date_threshold = $dtf->format_datetime(FixMyStreet::Cobrand::Zurich::sub_days( $now, $days ));
my $reports = FixMyStreet::App->model("DB::Problem")->search( {
state => $states,
- created => { '<', FixMyStreet::Cobrand::Zurich::sub_days( $now, $days ) },
+ created => { '<', $date_threshold },
bodies_str => { '!=', undef },
} );