Skip to content

fix(locale): handle delta of zero in Icelandic locale - #1358

Open
vineethsaivs wants to merge 2 commits into
arrow-py:masterfrom
vineethsaivs:fix/icelandic-locale-delta-zero
Open

vineethsaivs wants to merge 2 commits into
arrow-py:masterfrom
vineethsaivs:fix/icelandic-locale-delta-zero

Conversation

@vineethsaivs

Copy link
Copy Markdown

This handles a delta of zero in the Icelandic locale by falling back to the future form instead of raising a ValueError.

vineethsaivs and others added 2 commits June 13, 2026 02:50
The `X` (Unix timestamp) format token returned `f"{dt.timestamp()}"`, a float
like `1614556907.369226`, so `format("X")` leaked a fractional part and tokens
such as `XSSS` produced a stray dot and extra digits (e.g.
`1614556907.369226369`). This was a regression from 0.17.0, which emitted whole
seconds.

Return integer seconds (`int(dt.timestamp())`), matching the documented token
and pre-1.0 behavior. `XSSS` now yields `1614556907369` again.

Fixes arrow-py#933

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2224255) to head (ade9d80).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1358   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         2315      2313    -2     
  Branches       358       357    -1     
=========================================
- Hits          2315      2313    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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