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

Setting timezone for embbeded postgresql #233

Open
swapy opened this issue Mar 30, 2023 · 3 comments
Open

Setting timezone for embbeded postgresql #233

swapy opened this issue Mar 30, 2023 · 3 comments
Labels
type: bug A general bug

Comments

@swapy
Copy link

swapy commented Mar 30, 2023

Hello,

Can we set default timezone for this embedded database? If yes, can you let me know how?

@tomix26
Copy link
Collaborator

tomix26 commented Mar 30, 2023

Hi @swapy, thanks for the question. You can set it using the following configuration property:

zonky.test.database.postgres.server.properties.timezone=GMT

The server properties correspond to the options in the postgresql.conf file. So you can change other settings as well.

@tomix26 tomix26 added the status: waiting-for-feedback We need additional information before we can continue label Mar 30, 2023
@swapy
Copy link
Author

swapy commented Apr 4, 2023

Thank you very much @tomix26

I tried setting GMT as well as american time but it did not work

image

@tomix26
Copy link
Collaborator

tomix26 commented Apr 8, 2023

Yes, you're right, it doesn't work. Maybe it's because the server parameters are now passed as command-line parameters instead of editing the postgresql.conf file. But according to the documentation here, even the command-line parameters should work.

The TimeZone configuration parameter can be set in the file postgresql.conf, or in any of the other standard ways described in Chapter 19.

I'll have to investigate the problem more and I assume it will require some changes in the library. Note that even the ALTER SYSTEM SET timezone = 'America/Los_Angeles' sql command doesn't work for me, which is really weird.

@tomix26 tomix26 added type: bug A general bug and removed status: waiting-for-feedback We need additional information before we can continue labels Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants