Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[watermill-sql] Use TIMESTAMP WITH TIME ZONE instead of plain TIMESTAMP #379

Open
preslavrachev opened this issue Aug 20, 2023 · 0 comments

Comments

@preslavrachev
Copy link

I noticed this thing while implementing some changes in my project, regarding #378. It has not been a problem before, since the only date column in the messages table is auto-generated by the database engine. If we eventually decide to add support for delayed messages, this will erase the time zones of future execution times and may lead to problems when interpreting those times back in Go code.

The standard practice is to use TIMESTAMP WITH TIME ZONE (or the MySQL equivalent) and rely on timestamp-enabled times provided by clients.

I am just pointing this out for now. Even though it is a small change, it is not something that can be switched right away, as I am not 100% about the effect it will have on existing schemas. Most likely, plain timestamps will be interpreted as UTC, but this needs to be tested on both Postgres and MySQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant