diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-03-16 16:22:13 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-03-16 16:22:13 +0000 |
commit | a0a9ee69129480f9bd0026665b71e94ec4f2b311 (patch) | |
tree | a429718d8f4683cbb4305d13bf27785917529c10 /perllib/FixMyStreet/App/Controller/Open311.pm | |
parent | 9d9352ca6bbd757b30796d3cebd42f3ba06f6ddc (diff) | |
parent | b10ef57fc439648be3caaf44d7cbe117bf1fb521 (diff) |
Merge branch '2023-bad-open311-dates'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Open311.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Open311.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Open311.pm b/perllib/FixMyStreet/App/Controller/Open311.pm index 50f082e39..b50728b77 100644 --- a/perllib/FixMyStreet/App/Controller/Open311.pm +++ b/perllib/FixMyStreet/App/Controller/Open311.pm @@ -231,14 +231,15 @@ sub output_requests : Private { $problem->state( $statusmap{$problem->state} ); + my ($lat, $lon) = map { Utils::truncate_coordinate($_) } $problem->latitude, $problem->longitude; my $request = { 'service_request_id' => $id, 'title' => $problem->title, # Not in Open311 v2 'detail' => $problem->detail, # Not in Open311 v2 'description' => $problem->title .': ' . $problem->detail, - 'lat' => $problem->latitude, - 'long' => $problem->longitude, + 'lat' => $lat, + 'long' => $lon, 'status' => $problem->state, # 'status_notes' => {}, # Zurich has visible unconfirmed reports @@ -443,11 +444,10 @@ sub is_jurisdiction_id_ok : Private { # Input: DateTime object # Output: 2011-04-23T10:28:55+02:00 -# FIXME Need generic solution to find time zone sub w3date : Private { my $datestr = shift; return unless $datestr; - return DateTime::Format::W3CDTF->format_datetime($datestr); + return DateTime::Format::W3CDTF->format_datetime($datestr->truncate(to => 'second')); } =head1 AUTHOR |