Skip to content

Match the time zone list to Rails - #102

Merged
dadachi merged 1 commit into
mainfrom
fix/time-zones-match-rails
Oct 15, 2026
Merged

dadachi merged 1 commit into
mainfrom
fix/time-zones-match-rails

Conversation

@dadachi

@dadachi dadachi commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • TimeZoneData.swift now equals ActiveSupport::TimeZone.all from nativeapptemplateapi (activesupport 8.1.4): adds Asuncion (Rails 7.1), relabels Greenland to -02:00 (since 2023), Almaty/Astana to +05:00 (since 2024), Dublin/Casablanca to +00:00, and follows Rails' order.
  • The offsets also drive the device default (Utility.currentTimeZone), so America/Nuuk picked Mid-Atlantic instead of Greenland, and America/Asuncion picked Brasilia.
  • New TimeZoneDataTest embeds the Rails output as the oracle (bin/rails runner 'ActiveSupport::TimeZone.all.each { |z| puts "#{z.name}\t#{z}" }' in nativeapptemplateapi) and checks the Nuuk/Asuncion defaults.
  • The comment on the exact-name match in currentTimeZone cited Dublin and Casablanca as cities whose table offset differs from the system's; both now match (standard offset +00:00), so it no longer names them. The logic is unchanged and existing UtilityTest expectations still hold.

Port of dadachi/MyTurnTagCreator-iOS#149.

Test plan

  • TimeZoneDataTest on iPhone (device) before the fix: 3 tests failed with 4 issues (keys, labels, Asuncion, Nuuk)
  • After the fix: TimeZoneDataTest passes; full suite on device: 437 tests in 68 suites passed (1 known issue, the intentional one in WaitUntilTest)
  • make lint passes

🤖 Generated with Claude Code

https://claude.ai/code/session_01YDK5huvuRECyVrsQEdTN9q

The list lacked Asuncion (added in Rails 7.1) and labelled five zones
with outdated offsets: Greenland (-02:00 since 2023), Almaty and Astana
(+05:00 since 2024), and Dublin and Casablanca (+00:00 in Rails). The
offsets also drive the device default, so America/Nuuk picked
Mid-Atlantic instead of Greenland and America/Asuncion picked Brasilia.

The list is now ActiveSupport::TimeZone.all from nativeapptemplateapi
(activesupport 8.1.4), and TimeZoneDataTest compares it with that output.
Dublin and Casablanca now match the system's standard offset, so the
comment in currentTimeZone no longer cites them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDK5huvuRECyVrsQEdTN9q
@dadachi
dadachi merged commit 5eb1663 into main Oct 15, 2026
2 checks passed
@dadachi
dadachi deleted the fix/time-zones-match-rails branch October 15, 2026 08:15
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