←back to thread

189 points GordonS | 1 comments | | HN request time: 0.206s | source
Show context
manigandham ◴[] No.19535210[source]
As many other comments state, the most practical advice is to just use 'timestamp' and ensure that all applications always use UTC. The only exception is user-facing appointments that are scheduled in that user's timezone which can't be converted to UTC safely. In this case, store the timezone in a separate column specifically for those rows/entities that need it.

In neither case is timezonetz useful or necessary, and will actually end up causing more bugs by converting timezones to/from the database instead of just returning the value and letting your application deal with it.

replies(2): >>19535260 #>>19535778 #
1. mmaurizi ◴[] No.19535260[source]
Even better for future dates than storing the timezone is storing the geographic point the appointment is at and determining the timezone when necessary - as timezone boundaries can change.