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

Set timezone from initializer Ruby DSL #703

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

ayushn21
Copy link
Member

This is a 🐛 bug fix.

Summary

While running tests for the bridgetown-sitemap plugin, I found that the timezone wasn't being set if it was defined ONLY in the Ruby initializers file. I have no idea why this wasn't a problem yesterday, but it is today.

Upon investigation, I found that the timezone is set as an environment variable but this only happens when the configuration object is instantiated. The initializers run after the object is instantiated. Hence, the timezone value was set in the configuration object, but not in the environment variable meaning it wasn't used in the build.

I've added a timezone method to the DSL which sets this value.

@ayushn21 ayushn21 requested a review from jaredcwhite January 25, 2023 12:32
@ayushn21 ayushn21 force-pushed the fix-timezone branch 2 times, most recently from 6e39cf0 to 8b0258f Compare January 25, 2023 12:34
@jaredcwhite jaredcwhite merged commit 7a1f6ef into bridgetownrb:main Jan 25, 2023
@ayushn21 ayushn21 deleted the fix-timezone branch January 25, 2023 15:28
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

Successfully merging this pull request may close these issues.

2 participants