Skip to content

No ToSql/FromSql implementations for chrono::DateTime<FixedOffset> and Timestamptz? #4383

Answered by weiznich
si14 asked this question in Q&A
Discussion options

You must be logged in to vote

Am I missing something obvious, or is it just an oversight? I can, theoretically, convert FixedOffset to Utc, but in my case I want to store the precise offset that was provided to me elsewhere, instead of erasing it by normalising to Utc

Based on this comment I think you have a misunderstanding what TIMESTAMPTZ does:

For timestamp with time zone, the internally stored value is always in UTC (Universal Coordinated Time, traditionally known as Greenwich Mean Time, GMT). An input value that has an explicit time zone specified is converted to UTC using the appropriate offset for that time zone. If no time zone is stated in the input string, then it is assumed to be in the time zone indica…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@si14
Comment options

Answer selected by si14
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