Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
=========================================
Coverage 99.24% 99.24%
- Complexity 1143 1144 +1
=========================================
Files 48 48
Lines 2517 2518 +1
=========================================
+ Hits 2498 2499 +1
Misses 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sinkleberg
reviewed
Nov 8, 2026
gnutix
force-pushed
the
fix/instant-to-decimal-negative
branch
from
November 9, 2026 08:45
4a9e012 to
f058548
Compare
ubuntu-latest now points to Ubuntu 26.04, which no longer installs tzdata-legacy. Without it, PHP doesn't know legacy time zone names such as CET and Asia/Rangoon, which the tests use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQhVM8scWxQrMU3djngjpv (cherry picked from commit 1c48e3b)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gnutix
force-pushed
the
fix/instant-to-decimal-negative
branch
from
November 9, 2026 08:46
f058548 to
6c5b5cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item 5 of #137.
Problem
An
Instantstores a floored epoch second and a positive nano adjustment, so -0.5 s is stored as -1 s and 500000000 ns.toDecimal()concatenated the two, which gave the wrong value whenever the epoch second was negative and the nanos were not zero:Change
For a negative epoch second with nanos, the integer part is
-(epochSecond + 1)and the fraction is1e9 - nano.toISOString()was not affected: it goes throughZonedDateTime.PHP_INT_MINdoes not overflow, because-(PHP_INT_MIN + 1)isPHP_INT_MAX.New cases in
InstantTest::providerToDecimal(), includingPHP_INT_MIN.CI
The last commit is #133's
Install tzdata-legacy in CI, cherry-picked: theubuntu-26.04runner image no longer ships legacy zone names such asCETandAsia/Rangoon, so PHPUnit fails on every branch based onmain(#143 and #144 too). It is the same change as in #133, so it merges cleanly whichever lands first.🤖 Generated with Claude Code (Opus 5.5)