Back to all stories

When using Postgres' "at time zone 'UTC'" function, it converts the data type from timestamptz to timestamp, which can lead to unintended consequences as the resulting timestamp is without a time zone. This can cause issues as using timestamp without time zone is generally discouraged due to potential pitfalls, referred to as "footguns", that can arise from its use, highlighting the need to sometimes repeat "at time zone 'UTC'" to avoid these problems.