diff options
author | Struan Donald <struan@exo.org.uk> | 2012-04-25 13:03:10 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-04-25 13:03:10 +0100 |
commit | 689f178a53d1bdf451a4c46ebdefaec64ebbd7cf (patch) | |
tree | a80ac55a5a636c000431754f01c82baa8d63e24e /perllib | |
parent | 397d0b240d3326043b10a458e7a129cfd779834a (diff) |
force truncation of seconds as W3CDTF does not
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/SendReport/Open311.pm | 2 | ||||
-rw-r--r-- | perllib/Open311.pm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index 6fe2b7845..17492624d 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -41,7 +41,7 @@ sub send { push @$extra, { name => 'report_title', value => $row->title }; push @$extra, { name => 'public_anonymity_required', value => $row->anonymous ? 'TRUE' : 'FALSE' }; push @$extra, { name => 'email_alerts_requested', value => 'FALSE' }; # always false as can never request them - push @$extra, { name => 'requested_datetime', value => DateTime::Format::W3CDTF->format_datetime($row->confirmed_local) }; + push @$extra, { name => 'requested_datetime', value => DateTime::Format::W3CDTF->format_datetime($row->confirmed_local->set_nanosecond(0)) }; push @$extra, { name => 'email', value => $row->user->email }; $row->extra( $extra ); } diff --git a/perllib/Open311.pm b/perllib/Open311.pm index 07f4ab369..330f914ee 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -232,7 +232,7 @@ sub _populate_service_request_update_params { my $params = { update_id_ext => $comment->id, - updated_datetime => DateTime::Format::W3CDTF->format_datetime($comment->confirmed_local), + updated_datetime => DateTime::Format::W3CDTF->format_datetime($comment->confirmed_local->set_nanosecond(0)), service_request_id => $comment->problem->external_id, service_request_id_ext => $comment->problem->id, status => $comment->problem->is_open ? 'OPEN' : 'CLOSED', |