fix(validations): support raw GMT/UTC offset strings in timezone validation#6120
Merged
JhaSourav07 merged 1 commit intoJun 21, 2026
Merged
Conversation
…dation Closes JhaSourav07#5261 - Add normalizeTimezone() that maps GMT+N/UTC-N to Etc/GMT∓N format - Expand isValidTimeZone() to try normalization when direct lookup fails - Handle sign inversion (Etc/GMT convention is opposite to common usage) - Map GMT+0/UTC+0 to 'UTC' to avoid Etc/GMT ambiguity - Case-insensitive matching for gmt/utc prefixes - 21 tests covering normalization, schema validation, and edge cases
Contributor
📦 Next.js Bundle Size Report (Gzipped Sizes)
📊 Summary of Totals
|
Aamod-Dev
approved these changes
Jun 21, 2026
Aamod-Dev
left a comment
Collaborator
There was a problem hiding this comment.
Supporting raw GMT/UTC offset strings in timezone validation is a huge quality of life improvement for users not familiar with the tz database format. Handling the inverted sign convention (GMT+N -> Etc/GMT-N) inside normalizeTimezone is handled perfectly. Great test coverage as well. Approved!
Contributor
|
🎉 Congratulations @MasterJi27! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
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.
Fixes #5261