timestamp type fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not 2022-10-29 14:11:01 +10:00
parent b3768afb91
commit 86d3e2d9b5

View File

@ -129,7 +129,10 @@ namespace NeDvachAPI
using (var command = new NpgsqlCommand(@" using (var command = new NpgsqlCommand(@"
INSERT INTO dvach (post_id, post, post_timestamp) INSERT INTO dvach (post_id, post, post_timestamp)
VALUES ( DEFAULT, @postText, ( 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)) ) )", conn))
{ {
command.Parameters.AddWithValue("postText", postToSend.Text); command.Parameters.AddWithValue("postText", postToSend.Text);