I have a message table schema like this (msg_id, msg_from_id, msg_to_id, msg_text, msg_time).
…and I’m thinking about the conversion of the message timestamp.
- Store the user’s timezone in the users table, do an AT TIME ZONE = ‘SELECT tz FROM users where …’ while retrieving the messages.
- Retrieve the data just as is and convert on the client side
What’s the better approach between the two?