2 ms·
> Right, and timestamp is the one that causes this random adjustment. No, you having decided to leverage timezones is what causes it. This is a case of violenc
by masklinn 3y ago
> Right, and timestamp is the one that causes this random adjustment.
No, you having decided to leverage timezones is what causes it. This is a case of violence begetting more violence.
- hot_gril 3y agoI'm not sure what you mean by leveraging timezones. The SET TIMEZONE line was to simulate a fresh Postgres setup on my machine, which defaults to US/Pacific for me. If my cluster is hosted elsewhere, idk what it defaults to. Postgres's built-in now() returns a timestamptz, and if I were instead inserting values from – say – JS w/ node-pg and using `new Date()`, I'd get the same behavior. I'm not going out of my way here. If you're suggesting using timestamp rather than timestamptz, how do you do that without changing or assuming the DB's locale settings?