News for hackers. Stuff that matters.
Re:PostgreSQL – Don't Do This by misterio7 on Thursday June 01, 2023 @08:27AM (#36150186)
The server's timezone is not even relevant. By using timestamptz, you include the timezone together with the timestamp, meaning you can be absolutely sure that the time stored is indeed UTC! You avoid the mistake of mixing up local times and UTC and forgetting to convert them.
Re:PostgreSQL – Don't Do This by thermin on Thursday June 01, 2023 @08:49AM (#36150379)
the server timezone is absolutely relevant, it comes into play when a timestamp value is being read from a timestampz column.
Re:PostgreSQL – Don't Do This by foverzar on Thursday June 01, 2023 @10:55AM (#36151908)
Do people actually "timestamp" in local time?

This seems counterintuitive, aren't timestamps essentially number of seconds passed since 1 jan 1970 00:00 utc?

Re:PostgreSQL – Don't Do This by m_0x on Thursday June 01, 2023 @11:32AM (#36152597)
Yes, people will do anything if their systems and tools allow them to do it, either by ignorance or to facilitate them their current task. Both create tech debt and timestamp tech debt is one that is hard to pay.
Re:PostgreSQL – Don't Do This by paulryanrogers on Saturday June 03, 2023 @09:31AM (#36176535)
A naive CRUD may accept local times to make things easier for users, not realizing the DB needs UTC. Juniors often commit this error unless told ahead of time. Then you may have weeks or months of data that is wrong and possibly values from many zones.