|
|
|
|
|
by Arch485
1117 days ago
|
|
This is actually incorrect, as per Postgres docs `timestamptz` is always stored as a UTC timestamp. The benefit to this vs a regular timestamp is that when you insert/update a timestamp value, Postgres can then convert that timestamp to UTC if necessary before storing it, and if you select a timestamp value Postgres can convert it from UTC to the timezone you want. If your connection is set to use UTC, and you always handle UTC timestamps, there probably isn't much practical difference between `timestamp` and `timestamptz`, however. |
|
I dread timestamp issues. Hard to understand what happens and how to fix them.
You mention "if necessary". How does postgres knows if a conversion is necessary?