aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-12-16 12:52:16 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-12-16 12:52:16 +0000
commit12bbcc4bfa64cfb9677b9317929916d24dd472fb (patch)
tree20085c955101175da958ca6b3a481f68b87fc09d /perllib/FixMyStreet/App/Controller/Report.pm
parent38490f6ea18064c232bda6ebfbaee052bd8f0951 (diff)
parentadf07727ab14468c262759a21dedc1ac84cd32c8 (diff)
Merge branch 'issues/forcouncils/20-offline-inspecting'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 5a1cfbe54..3c251a5cb 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -408,10 +408,14 @@ sub inspect : Private {
$problem->lastupdate( \'current_timestamp' );
$problem->update;
if ( defined($update_text) ) {
+ my $timestamp = \'current_timestamp';
+ if (my $saved_at = $c->get_param('saved_at')) {
+ $timestamp = DateTime->from_epoch( epoch => $saved_at );
+ }
$problem->add_to_comments( {
text => $update_text,
- created => \'current_timestamp',
- confirmed => \'current_timestamp',
+ created => $timestamp,
+ confirmed => $timestamp,
user_id => $c->user->id,
name => $c->user->from_body->name,
state => 'confirmed',