Timezones [message #1862919] |
Sat, 06 January 2024 10:05 |
Mr Robot Messages: 72 Registered: March 2020 |
Member |
|
|
Greetings Scout community,
I'm working on an application with a single PostgreSQL database and multi-tenancy using the 'tenant_id' column on each table to split tenants. Each tenant requires support for different time zones.
I'm seeking advice on the best practices or recommended approaches for handling time zone support within a multi-tenant environment. How can I effectively manage time zone differences for each tenant in Eclipse Scout?
- I have tablePages using AbstractDateColumn and forms with AbstractDateField, all dates are stored in "timestamp without time zone" type columns. Is this ok?
- DB and App server are set to UTC.
- Do I need to convert all data after fetching from database to time with timezone of tenant, and then send it to client?
- Is it possible for each tenant to set timezone after login?
I found some posts on forum about timezone in Scout but I didnt get any help.
Any insights or examples would be immensely helpful.
Thank you for your assistance.
[Updated on: Sat, 06 January 2024 10:09] Report message to a moderator
|
|
|
|
Re: Timezones [message #1862925 is a reply to message #1862924] |
Sun, 07 January 2024 11:55 |
J D Messages: 102 Registered: February 2021 |
Senior Member |
|
|
Hi there M. Robot,
I would personally do that in Docker containers. One App server container per tenant in a specific timezone. The container instance can be initialized on the docker command line with the timezone (UTC +/-) so your date fields will contain the tenant's correct timezone. The App server containers can use the same container instance of PostgreSQL and the same data volume OR if you wish, a non-containerized local PostgreSQL installation.
This configuration may be easier for overall administration.
Cheers,
JD
[Updated on: Sun, 07 January 2024 13:04] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03550 seconds