Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129801 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id DB80D1A00BC for ; Wed, 21 Jan 2026 12:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1768997413; bh=2oUc/qDBl/ZNUE6cuS8kbSfH58nCNeDubCOZljJngnk=; h=From:Date:Subject:To:From; b=AffN9ljdD+F+Pl/ZVDzM5qUIO3kbJHk62DqgOr2syn4YytDnvnLhn1HTr+soxE+4I CV3tgZkoZwptA53HMJArUxitDT+5BOme6gGsAJqb34X0ddYQphX9F1hCaDLCTEsJql DmkaxtbAOpk2rhIzUxw/C5uWsekhQYblmp+7IQnQ25nhAjoQMBX9xD32lnJWSV8T3f TfEOfsLS/QEG9A4QcbS7dzuBc1RrFWLsSIicY3P3eyhz5z6XPjyPWszuH1oP1pO709 wGTsDL2IPaYktvLtVz3ikrlAmTpn4363oxTdtp9jSwDQkyunz+5jH4jWYu3qqTRclI vSmz9ZL0+B0mA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 68F5A180053 for ; Wed, 21 Jan 2026 12:10:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 21 Jan 2026 12:10:12 +0000 (UTC) Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-382fd45a1feso8795861fa.0 for ; Wed, 21 Jan 2026 04:10:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768997405; cv=none; d=google.com; s=arc-20240605; b=U39C4XeR87h/IGxQAlBwuRWitVxAFAEp6pZU0ZJPHK3UtiwQxKB+GgyKINpt6ZONOW vtRbSUIfhk68SLjoPhDdDR/dVu4fUvd2aIyocZRyuveAKX3ATCh3e0iGSLpBf/eao9sK ynro8MwR1Nrz8EV/9AcyuPxKE3CdEuvj7sOWr5gguoeihfssFn5oWFhCT/UfULMdL43D cM86hFd20LuS4FTnj9qzDw2Mt26S4wdDV5Rcco0nSyq7Yuzp78X2LISZRK/+qBQw05CN aOhflK2K04S/NJgEszNoVicJaRR9mOgJ/R58BWZ0q1siA06KyQXdjQ34V1WB7bqll2rx tXDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=AhiBnAfv7M5BOSzqty+17TYZBKKL6wdEsyL8Hgl0ZzQ=; fh=PwvV1jWZOR90rDIG/6XexqaHJyAFBTdnFVhsS64qdEQ=; b=KHL808432A/Cmd5g1Asr/7CZGFA7NTGXnIyloV2Xk5w/a9zp7/PVZ5zmMSHiWWPe/W fy3g3DCG8kh10qt2bOwejI0r69XYVVrm/i0SKOlkh/a/7LDZ/kpZIoqvPxUSAdxZELP9 4z2Ef44CqRCIqW+J7Pyqn85lnCsMkDCDVJxSZx5bkD7KAvBebTysF0nYR6/pENQMYgVa F+AVJsJDLdpbfyxGNxwpTdQNuPJP+sE+V8zCwQNgq3NQbzH+B7xmIJ69g1tY3EuXYyYR 6hdCF70+eMZMIPl0py8uGYHnnrXZVHibyYplddloUs9AdYP7Bg4ia4bJAAokET0YoasC fYZQ==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768997405; x=1769602205; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=AhiBnAfv7M5BOSzqty+17TYZBKKL6wdEsyL8Hgl0ZzQ=; b=LGmjzViOk2Gywqg1m6PjOQMUZxnjGQNj+7NgnWW93nh2PSKsOS1wwEg+j058nRL58W 7b34zjLMP2Zai5/ZJHI/zluYNhuHP1RYJbAt6PP31AR65nhSzkqZkno8eaqfZxKyxF3w x5CgFrYclajsIjSIUf3c1ylHlR+4a1c6InLv50pPHqfCDJLQe5MdVhOZaXExysDNauX9 SNI2LM2aGnUBaE7gOMuFiT4ew8xRH9vAZdfcOkAnMGX4kq3xAlPPkYoN80aioLpuX+zC opBkI61lsK52TYfg5A8LBJKQl9vIBPOc/y09xA849glEJZ26sxcZL3wTE8Dop/qs8CU8 Nx8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768997405; x=1769602205; h=to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AhiBnAfv7M5BOSzqty+17TYZBKKL6wdEsyL8Hgl0ZzQ=; b=I2K+3pwm5zdMtrNrpMojumb0z2wSRHnCfiv+y6YD+Oc7I9ZgTPk5sRuXbJzRtT7Tfn mGwEnRiK7XwYmcvEnqxXId+8vQJn/eO5N2jBcSt0TC7qYv1Fc85ozw4jKVJDgee+OPkq u21y0GpRQhZdw4t5i8VfDIGO9X8ZmWeGBcQs8LJNgdBszfF8v8258Uz+6LFHABhBg3Ud Mmxpgr+OT5PYL8yS6Y7GGxQcDXHbvh/Uop43jVmL49p1k3KzBZibSb9XxQlylmIJ5UwV PrUr+p2rFVCUmysWluV3DUOXQ40kW9D0nSAMeMdEDJct9bEX0gA887qyVoZQnXY8ufxT cf4g== X-Gm-Message-State: AOJu0Yzpkeu78/AKlPPpouoZx/Ob/wzBsuFEzyKWDmLUCJu3l/JP+GZd Syq3tKBj6N6HYd5ZAzKsgGAY/vsHWv8tO1W2hBwTfBHC+CnKPopNfP/2L3aVEpA617AYwPBLw+I TZX/jgcqx3aBWKu0mh9fFYdtsqLiGQN3K1KZE X-Gm-Gg: AZuq6aIXAOjZankNG98FrOzXYaiyqp7RmVYxvsRpqZKjeUsvDBe5T5g0Nn3uQBlxNob qF29zA0MaCJ6Lh/FSHu4ZY5+u1O/6c8J6ZCQPmxPFNd0mFGhHK8XvbSSPjH+omUTvqpgJRIpPFX WBFl6oOOYanTpF1vhVcylAwVIgVYUVPsBBSU2VTXDMaH93Cfuds7ZwidhDF7zNsJ+VmYdbwxq10 4iojL4WuGLXE5NLHdNNRn38JJ8PdAun2Aw/H9BwB0oG7dyr846gznOyFt3U5nE+fzMlhTI= X-Received: by 2002:a05:651c:4350:10b0:37a:582b:9ae3 with SMTP id 38308e7fff4ca-3836f0a06d0mr61538771fa.17.1768997405067; Wed, 21 Jan 2026 04:10:05 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Wed, 21 Jan 2026 12:09:55 +0000 X-Gm-Features: AZwV_QhxU98OQS_84iJII7RnMBmgvST4vw0Mdr9cgDhVpocfOKa6YcPaNstGLrU Message-ID: Subject: [PHP-DEV] Was deprecation of DATE_RFC7231 and DateTimeInterface::RFC7231 a mistake? To: PHP internals Content-Type: text/plain; charset="UTF-8" From: tekiela246@gmail.com (Kamil Tekiela) Hi All, I was one of the yes-voters for the https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_date_rfc7231_and_datetimeinterfacerfc7231 however, I would like to change my vote to no now. The explanation for the deprecation wasn't very clear, and I feel I was slightly misled by it. It claims that the constant was implemented by mistake, but I don't think that was the case. DATE_RFC7231 follows the timestamp specification from the HTTP format. It has been repeated by the current RFC 9110 https://www.rfc-editor.org/rfc/rfc9110#section-5.6.7 The GMT part isn't a mistake; it's hardcoded as part of the format. Thus, the constant is implemented correctly in PHP. It's true that this could lead to unexpected results when you format a DateTime that isn't in UTC, but that's a programmer mistake and not the fault of the constant. The format is timezone agnostic so it's the responsibility of the programmer to ensure the DateTime object is in UTC before formatting. Users are now faced with having to replace the constant with its string value, despite the constant having a well-defined use and producing correct and "wanted" results. This is more error-prone than accidentally forgetting to call setTimezone(DateTimeZone::UTC). Deprecating this constant hasn't improved anything for PHP users and only made things worse. What do you think? Should we undeprecate these constants? Regards, Kamil Tekiela