Add backbone for announcements page - #1
Merged
Merged
Conversation
bedroesb
commented
Sep 22, 2026
bedroesb
commented
Sep 22, 2026
kdp-cloud
suggested changes
Sep 27, 2026
|
|
||
| # Jekyll has already put `timezone:` from _config.yml into ENV["TZ"], so | ||
| # Time.local picks the right offset for that date, DST included. | ||
| def localize(value) |
Contributor
There was a problem hiding this comment.
What happens when people remove timezone or make a typo? As it is now, the else branch of your case statement will just return the invalid value. Wouldn't it make more sense to return a default value like 'UTC' in the 'else' branch?
Contributor
Author
There was a problem hiding this comment.
The idea is that the CI validate.rb fails and the user has to fix the date in his PR.
Contributor
Author
There was a problem hiding this comment.
I don't like to make assumptions and put defaults tbh :/
Contributor
Author
There was a problem hiding this comment.
But I did make the validate script stricter
Co-authored-by: Kevin De Pelseneer <[email protected]>
Co-authored-by: Kevin De Pelseneer <[email protected]>
Contributor
Author
|
Due to time, I will merge. If you want to guard the timezone better, you can do it in a PR :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is still a demo and thus contains lots of placeholders.
README will follow later.