changeset 1520:6ad1f431bc85

Fixed date of latest measurement in bottlenecks list. As the time zone conversion done by geoserver leads to unexpected results for date fields if the local timezone differs from UTC, I replaced the date column in the bottleneck_overview view with text. As the transport format used (JSON) does handle dates as strings anyway we do not loose any information by doing so...
author Sascha Wilde <wilde@intevation.de>
date Thu, 06 Dec 2018 15:37:06 +0100
parents 08e1b38a4a8b
children 276df8dadc14
files client/src/components/map/contextbox/Bottlenecks.vue schema/gemma.sql
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/map/contextbox/Bottlenecks.vue	Thu Dec 06 14:34:03 2018 +0100
+++ b/client/src/components/map/contextbox/Bottlenecks.vue	Thu Dec 06 15:37:06 2018 +0100
@@ -276,7 +276,7 @@
       }
     },
     displayCurrentSurvey(current) {
-      return current ? current.substr(0, current.length - 1) : "";
+      return current ? current : "";
     },
     displayCurrentChainage(from, to) {
       return from / 10 + " - " + to / 10;
--- a/schema/gemma.sql	Thu Dec 06 14:34:03 2018 +0100
+++ b/schema/gemma.sql	Thu Dec 06 15:37:06 2018 +0100
@@ -535,7 +535,7 @@
       ST_Centroid(area)::Geometry AS point,
       (lower(stretch)).hectometre AS from,
       (upper(stretch)).hectometre AS to,
-      sr.current
+      sr.current::text
     FROM waterway.bottlenecks bn LEFT JOIN (
       SELECT bottleneck_id, max(date_info) AS current FROM
       waterway.sounding_results