RepoJournal
Elixir & Phoenix Elixir & Phoenix
107 wires and counting

$ follow Elixir & Phoenix

Keep up with Elixir & Phoenix in about 3 minutes: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

fair warning: these emails are deeply technical. diffs, version numbers, CVEs, benchmark deltas. if that's not your idea of a good read, this isn't your newsletter.

Folds into your digest — weekly by default, monthly if you prefer. Unsubscribe in one click.

$ status

wire 2026-07-11
stories 35

© 2026 RepoJournal Home Showcase Explore How it works Privacy

$ the-wire · showcase

ELIXIR FIXES TIME MATH BUG THAT ROUNDS THE WRONG WAY

By RepoJournal · Filed · About Elixir & Phoenix · Composed from the cited sources · methodology

NaiveDateTime.diff/3 has been silently rounding elapsed time up instead of down, breaking its documented contract and potentially causing logic errors in any code relying on time-based calculations.

The culprit: NaiveDateTime.diff/3 was truncating each operand separately before subtracting, computing floor(t1) - floor(t2) instead of floor(t1 - t2) [1]. When the subtrahend's fractional seconds exceeded the minuend's, this flipped the rounding direction entirely. An elapsed span of 86399.5 seconds (less than one day) incorrectly returned 1 for :day. This fix restores the documented guarantee that fractional results are truncated, not rounded up. Meanwhile, Duration.from_iso8601/1 was accepting malformed ISO 8601 strings with duplicate S markers for seconds [2], a parsing bug now corrected. On the spec side, Registry.lock/3 gains its missing type signature [3], and List specs are tightened to match their actual input handling [4]. These are the kind of quiet correctness fixes that ship before someone's calendar math breaks in production.

Quick answers

What shipped in Elixir & Phoenix on July 11, 2026?
NaiveDateTime.diff/3 has been silently rounding elapsed time up instead of down, breaking its documented contract and potentially causing logic errors in any code relying on time-based calculations. In total, 18 commits and 17 pull requests landed.
Who contributed to Elixir & Phoenix on July 11, 2026?
4 developers shipped this update, including Alexander Gubarev, nseaSeb, Łukasz Samson, and SteffenDE.
What were the notable Elixir & Phoenix updates?
Fix `NaiveDateTime.diff/3` over-counting incomplete units, Fix Duration.from_iso8601/1 accepting duplicate S (secs) when fractional, and Add spec to Registry.lock/3 (#15575).