How Does Postgres Store Time Zones
Postgresql Doesn’t Store the Time Zone They Come from with Your Timestamp. Instead It Converts to and from the Input and Output Timezone Much Like We’ve Seen...
PostgreSQL doesn’t store the time zone they come from with your timestamp. Instead it converts to and from the input and output timezone much like we’ve seen for text with client_encoding.
How are timestamps stored in PostgreSQL?
PostgreSQL stores the timestamptz in UTC value. When you insert a value into a timestamptz column, PostgreSQL converts the timestamptz value into a UTC value and stores the UTC value in the table.
How does SQL store time zones?
- Simply store the IANA identifier as a string along with each location.
- Store all IANA identifiers in a separate table and use a foreign key to link to it.