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.




Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.