From 86d3e2d9b56adce1d493007f6cd3b04a3a0666ae Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Sat, 29 Oct 2022 14:11:01 +1000 Subject: [PATCH] timestamp type fix --- DBchat.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DBchat.cs b/DBchat.cs index 0a0a255..5940149 100644 --- a/DBchat.cs +++ b/DBchat.cs @@ -129,7 +129,10 @@ namespace NeDvachAPI using (var command = new NpgsqlCommand(@" INSERT INTO dvach (post_id, post, post_timestamp) VALUES ( DEFAULT, @postText, ( - SELECT date_trunc( 'second', now()::timestamp(0) AT TIME ZONE 'UTC+10') + SELECT date_trunc( + 'second', + (now()::timestamp(0) AT TIME ZONE 'UTC+10')::TIMESTAMP + ) ) )", conn)) { command.Parameters.AddWithValue("postText", postToSend.Text);