Better HN
topnewbestaskshowjobs
Log inSign up

mrrubberburner

1 karma · joined May 31, 2023 (3y ago) · 4 submissions

Submissions

comment 3y ago · link · parent

Timezonetz is explicitly designed for simplified arithmetic. By storing local values that have been converted to the utc constant, you get around the problem entirely. I think there must be some fundamental misunderstanding in these threads that information is somehow being lost by storing in utc when that isn’t at all true.

comment 3y ago · link · parent

Future events are trivially handled by timestamptz. PG takes your future timestamp and your client connections timezone converts to a utc constant and likewise casts the utc time to your timezone on reads.

comment 3y ago · link · parent

If a user doesn't want to follow dst then they can say so and follow standard time by configuring their client connection. I’m struggling to think of a case where I would want an alarm clock setting or a dinner reservation to not be adjusted for the locally observed time.

comment 3y ago · link · parent

Afaik Databases(as opposed to server) have a default timezone setting, but that is only used if the client hasn’t provided one.