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

Configure timezone to avoid confusing issues #1

Open
trevorchaney opened this issue Nov 17, 2023 · 0 comments
Open

Configure timezone to avoid confusing issues #1

trevorchaney opened this issue Nov 17, 2023 · 0 comments

Comments

@trevorchaney
Copy link

trevorchaney commented Nov 17, 2023

psqlInfo := fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=disable", dbHost, dbPort, dbUser, dbPassword, dbName)

When connection to the database, if you don't configure the timezone, all times within the database are set to display as UTC. This can cause confusing issues with the user entering seeded data at their time in their timezone and it being displayed differently. My time zone is "American/Chicago" -6 hours from GMT. I was running into issues with the 'List' query because it expects that the date of the timestamp be the current date but without the connection settings I kept getting the 'not enough data' error message because all the seeded data is shown as 6 hours from now (the next day). Really confusing, Hope it helps.

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