Re:Working with Postgres Types
by doctor_eval on Monday August 09, 2021 @06:51AM
(#28115057)
Oh ok yep sure, you're right. If you want to keep the timestamp then you need to keep it in both cases.
But with timestamptz you don't need to use the timezone in most calculations while with timestamp you do need to use the timezone otherwise unexpected behaviour can creep in.
But yes I do agree that you're technically correct, and that's the best kind of correct after all :)
If the client sends 2021-08-08T07:00:00+03 to the server, in either case the offset of +03 is going to be lost. As you know, timestamp will keep the clock time and timestampz will keep the "moment in time" (under the hood by converting to UTC.) I'd argue those are just two different rules for "dropping the offset".