Postgresql – Does date_trunc go through 2 transformations even before truncation?
I was surprised select date_trunc('day','2021-02-16 20:00+04'::timestamptz); returned 2021-02-17 00:00:00+08 in postgres. It's like we moved forward in time from 16th to 17th. I want to check my understanding and find sources explaining this (ideally official). The session has set timezone…