Skip to content

feat: improve Rails zones mapping behavior#166

Merged
mattjohnsonpint merged 7 commits intomainfrom
mjp/rails
Oct 17, 2025
Merged

feat: improve Rails zones mapping behavior#166
mattjohnsonpint merged 7 commits intomainfrom
mjp/rails

Conversation

@mattjohnsonpint
Copy link
Owner

@mattjohnsonpint mattjohnsonpint commented Oct 16, 2025

When mapping to a Rails zone, if there's no Rails short name, we should not give up! Rails supports IANA names directly, and also supports fixed offsets.

This PR changes the *ToRails behavior such that:

  • If the mapping is a fixed offset, then return the fixed offset such as +06:00 or -03:00
  • If there's a valid Rails short name to use, then continue to use it.
  • Otherwise, return the IANA name

One edge case - retain the Dateline Standard Time Windows to International Date Line West Rails mapping. (but use Etc/GMT+12 for IANA)

@mattjohnsonpint mattjohnsonpint merged commit 0e327f6 into main Oct 17, 2025
3 checks passed
@mattjohnsonpint mattjohnsonpint deleted the mjp/rails branch October 17, 2025 16:14
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.

1 participant