Postgres AT TIME ZONE 'UTC' does NOT do what you think it does
And why you may need to repeat AT TIME ZONE 'UTC' twice.
SUMMARY
* AT TIME ZONE 'UTC' converts the data type from timestamptz to timestamp (example)
* The equality of timestamp and timestamptz will always be false.
* Adding a month with + INTERVAL '1 months' is timezone-dependent. If your product operates in UTC, you must ensure the timezone is in UTC before adding a month with <timestamptz_column> AT TIME ZONE 'UTC' + INTERVAL '1 months'.... but now the result is a timestamp,
Comments (0)
No comments yet
