diff options
-rw-r--r-- | perllib/Problems.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perllib/Problems.pm b/perllib/Problems.pm index 14fdca877..aad6c0716 100644 --- a/perllib/Problems.pm +++ b/perllib/Problems.pm @@ -304,10 +304,11 @@ sub council_problems { push @params, $one_council; $where_extra = "and areas like '%,'||?||',%'"; } + my $current_time = dbh()->selectrow_array('select ms_current_timestamp()'); my $problems = select_all( "select id, title, detail, council, state, areas, - extract(epoch from ms_current_timestamp()-lastupdate) as duration, - extract(epoch from ms_current_timestamp()-confirmed) as age + extract(epoch from '$current_time'-lastupdate) as duration, + extract(epoch from '$current_time'-confirmed) as age from problem where state in ('confirmed', 'fixed') $where_extra |