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

Allow to set the application timezone via secrets #5318

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Conversation

Senen
Copy link
Member

@Senen Senen commented Nov 15, 2023

References

This PR makes sense along with:

Objectives

If the installer PR#230 gets merged, installations can set the desired timezone from the installer.

This PR makes the application read the timezone from the application secrets. When the timezone is not defined in application secrets, the application uses Madrid as the default timezone.

This will allow Consul Democracy installations to change the application timezone via secrets without coding or deploying the application. Of course, after updating the secrets, the application must be restarted for the new timezone to take effect.

Release notes

Existing installations using a timezone other than Madrid can now add the time_zone entry to the secrets.yml file before deploying these changes so, if you have some custom code to set the application timezone, you can remove it and rely on the secrets configuration.

You can search supported timezone names by running the following in the rails console:
ActiveSupport::TimeZone.all

@javierm javierm added this to Doing in Consul Democracy Nov 15, 2023
@Senen Senen marked this pull request as ready for review November 20, 2023 08:24
@Senen Senen moved this from Doing to Reviewing in Consul Democracy Nov 20, 2023
Consul Democracy automation moved this from Reviewing to Testing Nov 21, 2023
config/application.rb Outdated Show resolved Hide resolved
config/secrets.yml.example Outdated Show resolved Hide resolved
@javierm javierm moved this from Testing to Doing in Consul Democracy Nov 22, 2023
@Senen Senen force-pushed the application_timezone branch 2 times, most recently from 13bae31 to 3c3de90 Compare November 23, 2023 17:15
@Senen Senen moved this from Doing to Reviewing in Consul Democracy Nov 23, 2023
@javierm javierm moved this from Reviewing to Doing in Consul Democracy Nov 27, 2023
This will allow us to keep using the timezone used when running
the installer.

We keep using Madrid as default timezone in the installer and in
the application.
@javierm javierm moved this from Doing to Reviewing in Consul Democracy Nov 27, 2023
@Senen Senen merged commit d7a4828 into master Jan 19, 2024
12 of 13 checks passed
Consul Democracy automation moved this from Reviewing to Release 2.1.0 Jan 19, 2024
@Senen Senen deleted the application_timezone branch January 19, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants