Re: Was deprecation of DATE_RFC7231 and DateTimeInterface::RFC7231 a mistake?

From: Date: Wed, 21 Jan 2026 15:10:31 +0000
Subject: Re: Was deprecation of DATE_RFC7231 and DateTimeInterface::RFC7231 a mistake?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-129805@lists.php.net to get a copy of this message
Hi Am 2026-01-21 15:47, schrieb Derick Rethans:
possibility to change the timezone to UTC. So I disagree, as people rightfully should have expected PHP to handle a specific pre-cooked format to behave as the RFC that is named after ought to behave.
I agree with Derick's entire email, but particularly this part: Providing some helper constant that requires you to perform an important “extra step” with nothing forcing you to perform that extra step and where not performing that extra step will result in behavior that is subtly incorrect is dangerous API design. The further away from UTC your “default timezone” is, the more wrong will the results be. This can have significant consequences on the behavior of your application, e.g. cookies expiring too soon or too late and confusing HTTP caching behavior. Best regards Tim Düsterhus

« previous php.internals (#129805) next »