Hacker News new | ask | show | jobs
by aljarry 910 days ago
> time goes backwards is DST

Only if you deal with timestamps that don't contain timezone information. With TIMESTAMPTZ in postgres it's transparent, you don't have to do anything specifically to manage DST.

1 comments

Postgres does not store the actual time zone information, it just stores it in UTC. Is a bit counterintuitive but this is how it works [1]. The "with time zone" part is just for parsing and displaying back. When is displayed the value is converted from UTC to the local time in the current timezone which can result in some very interesting discussions :).

[1] https://www.postgresql.org/docs/current/datatype-datetime.ht...

TIL :) thanks, I misunderstood that part.