From 0218f2fa73b060caf8ab7dee433bda9896c12f88 Mon Sep 17 00:00:00 2001 From: xbgmsharp Date: Sun, 19 Nov 2023 22:17:47 +0100 Subject: [PATCH] Follow best practive don't use timestamp(0) --- initdb/02_5_signalk_api_deps.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/initdb/02_5_signalk_api_deps.sql b/initdb/02_5_signalk_api_deps.sql index d087a1f..7ed4257 100644 --- a/initdb/02_5_signalk_api_deps.sql +++ b/initdb/02_5_signalk_api_deps.sql @@ -107,9 +107,9 @@ AS $vessel$ jsonb_build_object( 'name', coalesce(m.name, null), 'mmsi', coalesce(m.mmsi, null), - 'created_at', v.created_at::timestamp(0), - 'first_contact', coalesce(m.created_at::timestamp(0), null), - 'last_contact', coalesce(m.time::timestamp(0), null), + 'created_at', v.created_at, + 'first_contact', coalesce(m.created_at, null), + 'last_contact', coalesce(m.time, null), 'geojson', coalesce(ST_AsGeoJSON(geojson_t.*)::json, null) )::jsonb || api.vessel_details_fn()::jsonb INTO vessel