Skip to content

Conversation

@marc-mabe
Copy link
Contributor

@marc-mabe marc-mabe commented Jun 16, 2025

Timelib internally uses timelib_sll to store the unix timestamp which is int64_t.

This PR allows a range of INT64_MIN to INT64_MAX.999999 on 32 bit environments as well if initialized by createFromTimestamp(float).

This fixes #20967

@marc-mabe
Copy link
Contributor Author

@derickr ping

Copy link
Member

@derickr derickr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should get an entry in the NEWS file too, or ideally with a reference to a GH- bug report.

@marc-mabe marc-mabe changed the title Support range of INT64_MIN/MAX on 32bit for DateTime[Immutable]::createFromTimestamp Fixes #20967 Support range of INT64_MIN/MAX on 32bit for DateTime[Immutable]::createFromTimestamp Jan 18, 2026
…sses support for 64bit integers or 32bit environments
@marc-mabe marc-mabe force-pushed the createFromTimestamp-float-int64 branch from d9e3738 to e77c9f8 Compare January 18, 2026 16:13
@marc-mabe marc-mabe changed the base branch from master to PHP-8.4 January 18, 2026 16:13
@marc-mabe
Copy link
Contributor Author

@derickr Created and referenced a GH bug ticket + NEWs entry and - as referenced as bug - targeting PHP 8.4 now

@marc-mabe marc-mabe requested a review from derickr January 18, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DateTime[Immutable]::createFromTimestamp(float) misses support for 64bit integers or 32bit environments

2 participants