• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dblock / distance_of_time_in_words / 34404801208
100%
master: 99%

Build:
Build:
LAST BUILD BRANCH: restore-same-clock-coverage
DEFAULT BRANCH: master
Ran 09 Sep 2026 09:04PM UTC
Jobs 8
Files 5
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Sep 2026 09:04PM UTC coverage: 99.647% (+0.4%) from 99.286%
34404801208

push

github

dblock
Add Pacific/Norfolk historical offset regression example, fix #170

Adds a regression example (from https://github.com/dblock/tz_test)
demonstrating that Pacific/Norfolk's 2015 historical UTC offset change
(#153) folds correctly into the calendar distance rather than leaking
as a spurious 30 minutes.

Also fixes #170, discovered while verifying this example across the
full Rails version matrix: distance_of_time_in_words unconditionally
called #to_time on any ActiveSupport::TimeWithZone argument, which on
Rails < 8.0 (before to_time_preserves_timezone defaulted to :zone)
discards the real timezone and returns a plain Time in the process's
local zone instead. This meant same_clock? (added for #162/#165) could
never recognize two TimeWithZone values as the same clock on Rails <
8.0, even when they obviously were - not because the underlying bug is
inherent to older Rails, but because of an unforced conversion dotiw
performed on an argument that didn't need it. TimeWithZone already
supports every operation TimeHash needs without ever being converted to
a plain Time, so #coerce_to_time now only converts arguments that
aren't already a Time or TimeWithZone (e.g. Date/DateTime). This makes
the Norfolk example (and the existing #165 Dublin example) pass on
every supported Rails version, not just Rails >= 8.0.

Verified locally across the full test suite and the Rails 7.0-8.1
gemfiles, 0 failures, no skips required.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

6 of 6 new or added lines in 1 file covered. (100.0%)

282 of 283 relevant lines covered (99.65%)

627.02 hits per line

Jobs
ID Job ID Ran Files Coverage
1 ruby-3.4-gemfiles/rails_7.2.gemfile - 34404801208.1 09 Sep 2026 09:05PM UTC 5
98.94
GitHub Action Run
2 ruby-3.4-gemfiles/rails_8.0.gemfile - 34404801208.2 09 Sep 2026 09:05PM UTC 5
98.94
GitHub Action Run
3 ruby-3.4-gemfiles/rails_7.0.gemfile - 34404801208.3 09 Sep 2026 09:04PM UTC 5
98.94
GitHub Action Run
4 ruby-3.4- - 34404801208.4 09 Sep 2026 09:04PM UTC 4
99.22
GitHub Action Run
5 ruby-3.4-gemfiles/rails_8.1_i18n.gemfile - 34404801208.5 09 Sep 2026 09:05PM UTC 5
98.94
GitHub Action Run
6 ruby-3.4-gemfiles/rails_7.1.gemfile - 34404801208.6 09 Sep 2026 09:05PM UTC 5
98.94
GitHub Action Run
7 ruby-3.4-gemfiles/rails_8.1.gemfile - 34404801208.7 09 Sep 2026 09:05PM UTC 5
98.94
GitHub Action Run
8 ruby-3.4-gemfiles/rails_6.0.gemfile - 34404801208.8 09 Sep 2026 09:04PM UTC 5
98.94
GitHub Action Run
Source Files on build 34404801208
  • Tree
  • List 5
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34404801208
  • d207c150 on github
  • Prev Build on master (#34403773821)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc