From 21f96483f586cf55b3243d7963d95032da7a51b8 Mon Sep 17 00:00:00 2001 From: xbgmsharp Date: Sun, 19 Nov 2023 21:49:19 +0100 Subject: [PATCH] Follow best practive don't use timestamp(0) https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_timestamp.280.29_or_timestamptz.280.29 --- initdb/02_5_signalk_api_deps.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initdb/02_5_signalk_api_deps.sql b/initdb/02_5_signalk_api_deps.sql index 5fb84f8..d087a1f 100644 --- a/initdb/02_5_signalk_api_deps.sql +++ b/initdb/02_5_signalk_api_deps.sql @@ -46,7 +46,7 @@ CREATE OR REPLACE VIEW api.vessels_view WITH (security_invoker=true,security_bar SELECT v.name as name, v.mmsi as mmsi, - v.created_at::timestamp(0) as created_at, + v.created_at as created_at, m.last_contact as last_contact, ((NOW() AT TIME ZONE 'UTC' - m.last_contact::TIMESTAMPTZ) > INTERVAL '70 MINUTES') as offline, (NOW() AT TIME ZONE 'UTC' - m.last_contact::TIMESTAMPTZ) as duration