The Daily Commit · Section Edition Front Page PHP AI Dev EN DE FR ES

The Php Times

RFC Watch — Ecosystem

PHP RFC advances the next step in its time API


Tim Düsterhus and Derick have proposed Time\Instant and Time\Clock as the next additions to PHP’s new date and time API after Time\Duration in PHP 8.6.

PHP INTERNALS ([RFC]/[VOTE]), September 22, 2026 curated by Heiko

The RFC is open well before the next feature freeze. Andreas Heigl has questioned its leap-second model and the relationship between Time\Clock and Psr\Clock\ClockInterface.

Tim Düsterhus and Derick have submitted Time\Instant and Time\Clock as the next part of PHP’s new date and time API, following Time\Duration in PHP 8.6. The authors expect several months for discussion before the next feature freeze. They want to keep the RFC focused and have placed some additional ideas in a Future Scope section.

The proposal defines Time\Instant as a timezone-free value for one unique point on the global timeline. Andreas Heigl supports that model but asked whether the decision to ignore leap seconds applies only to ISO 8601 strings or to the entire design. He also questioned the name and role of Time\Clock alongside Psr\Clock\ClockInterface. In his view, the proposed class is not yet a direct replacement because Time\Instant cannot currently produce a DateTimeImmutable directly.

Read the original source ↗

Rate this article: 0

Readers’ Forum

No contributions yet — open the debate.

← Ecosystem — Page B1

"All the Code That's Fit to Ship" · The Daily Commit · Screen edition · Imprint · Privacy Policy