Skip to content

Can't get to Use Option<DateTime<Local>> for a NULL able TIMESTAMPTZ column in postgres. #2971

Answered by smf8
smf8 asked this question in Q&A
Discussion options

You must be logged in to vote

For future visitors of this Q&A. The problem can be solved by overriding column type at select query.

So instead of

        SELECT * FROM test WHERE id = $1

You should use

        SELECT id,description, deleted_at as "deleted_at: DateTime<Local>" FROM test WHERE id = $1

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@xpe
Comment options

@xpe
Comment options

Answer selected by smf8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants