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

dblock / distance_of_time_in_words / 34354810893
99%

Build:
DEFAULT BRANCH: master
Ran 09 Sep 2026 01:05PM 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 01:01PM UTC coverage: 100.0%. Remained the same
34354810893

push

github

dblock
Fix #160: don't fold unrelated UTC offset differences into the distance

offset_delta previously computed largest.utc_offset - smallest.utc_offset
for any two Time-like objects, assuming any offset difference represented
a real DST or tzdata transition of the same clock (as with #63 and #153).
That assumption breaks when the two times are simply expressed with
different, unrelated offsets (e.g. one in UTC, one with an explicit
"-08:00" offset) - there is no transition, so folding in the difference
double counts what Time#- already got right, producing wildly incorrect
results (e.g. reporting "9 hours" for an actual 1-hour difference).

Add a same_clock? guard: only fold the offset difference in when both
times are the same underlying clock, i.e. two ActiveSupport::TimeWithZone
values in the same zone, or two plain Time values in the process's system
zone (as opposed to one built with a fixed numeric offset, or in UTC mode).

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

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

278 of 278 relevant lines covered (100.0%)

624.13 hits per line

Jobs
ID Job ID Ran Files Coverage
1 ruby-3.4-gemfiles/rails_8.1.gemfile - 34354810893.1 09 Sep 2026 01:05PM UTC 5
99.28
GitHub Action Run
2 ruby-3.4-gemfiles/rails_6.0.gemfile - 34354810893.2 09 Sep 2026 01:05PM UTC 5
99.28
GitHub Action Run
3 ruby-3.4-gemfiles/rails_7.2.gemfile - 34354810893.3 09 Sep 2026 01:05PM UTC 5
99.28
GitHub Action Run
4 ruby-3.4-gemfiles/rails_7.1.gemfile - 34354810893.4 09 Sep 2026 01:05PM UTC 5
99.28
GitHub Action Run
5 ruby-3.4-gemfiles/rails_8.1_i18n.gemfile - 34354810893.5 09 Sep 2026 01:05PM UTC 5
99.28
GitHub Action Run
6 ruby-3.4-gemfiles/rails_8.0.gemfile - 34354810893.6 09 Sep 2026 01:05PM UTC 5
99.28
GitHub Action Run
7 ruby-3.4-gemfiles/rails_7.0.gemfile - 34354810893.7 09 Sep 2026 01:05PM UTC 5
99.28
GitHub Action Run
8 ruby-3.4- - 34354810893.8 09 Sep 2026 01:05PM UTC 4
99.6
GitHub Action Run
Source Files on build 34354810893
  • Tree
  • List 5
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34354810893
  • 509d3fab on github
  • Prev Build on master (#33124844030)
  • Next Build on master (#34356848137)
  • 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