Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127723 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 431351A00BC for ; Thu, 19 Jun 2025 13:16:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750338863; bh=HuXlJuNs6T6UxtYa6f9h5WOH3xfKx2Rkcvhlnij4Mr0=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=VWPV9OHrkn+geizsPSov+t42pjuj3Pz82bn4iZLDMhcWKMFy+lbc8UMAZE9cc/vWt KQX+sr2zjoOr7ckm7QwlcqNpNmnVDfhq5fAEkRq0IiVqs16Btn9Ehdt9VBwfPzy35U QmPWqhzPWJVsOrnUaf26tk21qIw055gh8JMUXMN9DY7V3U4lKJ6LBsXd4e5YcEFtzq TmY2+8jwST/S0LEk6eXGF03DtL7ITrl2gKjZfRowrAhbp8zjyXVgg4n0WFKTEmCQgJ fnrpd7KeoVrcR5B4qpApKI7c4ArJspxDk/LgSSUWCC9VWUa6nsNRzE7MXd6W7b0QY3 U1QkXFOlSBl3A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 998D0180053 for ; Thu, 19 Jun 2025 13:14:22 +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=3.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_PASS, SPF_SOFTFAIL autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 19 Jun 2025 13:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1750338969; bh=HuXlJuNs6T6UxtYa6f9h5WOH3xfKx2Rkcvhlnij4Mr0=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=EOvhs+IeiXads53Zx4IZYnQBapZDtgzkDCJp03nkVjCSWTTBRZfUy9vMguseDqb9C GXN0SlVTa1oilxzKuIRRQ/Cp05uIbeySHkSH3ZN6MamaZXkKpZPAlw52L5ov4cqxwr ftgOZD97tLKs7xxtC4iHzGsKGRMFq3NfuYjWrAqORfVwBAlKovy5ELsxQQ3Egzp1ag +GrpCtcrvSoohCoJeG9GJZ/UEMzpgG7W9QHXgjMfN9vqDLFTP9U+gPhQOH4/e1Z87B NyZtRy8LzNgzCih8mPS5nl0GcMbX7tP46BYpJ+A43kNP+vwEncyuJK6zyokWcZqIO0 t+YxtAHux9lJA== Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id E8BB810C027; Thu, 19 Jun 2025 14:16:08 +0100 (BST) Date: Thu, 19 Jun 2025 14:16:08 +0100 (BST) To: Marc Bennewitz cc: php internals Subject: Re: [PHP-DEV] Year 2038 issue In-Reply-To: <4093d14a-8e53-4843-9a07-c7f1d1f339c5@mabe.berlin> Message-ID: <736d42c5-04cd-d009-9be9-b3706a1cbe8c@php.net> References: <4093d14a-8e53-4843-9a07-c7f1d1f339c5@mabe.berlin> Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII From: derick@php.net (Derick Rethans) Hi, On Mon, 16 Jun 2025, Marc Bennewitz wrote: > It's 12.5 years only until the timestamps in PHP on 32bit will not work as > expected anymore. > > The DateTime[Immutable] classes use 64bit integers internally already but > there are still a couple of places where this is an issue in the API due to > PHP integer limit: > > Based on that I personally would start to deprecate some of the functions and > point to the OOP API and allow floating point values as timestamps. I think I would agree with deprecating the "really old" date time APIs as well, but not because of the 2038 problem. However, I also don't think we should deprecate these before there is a better Date/Time API in PHP which solves a few of the issues with the current Date/Time classes and methods. Although they handle the 2038 issue, there are obviously numerous issues with it (Immutable vs non-Immutable, or not having dedicated types for timezoned/local dates, and instants, for example). cheers, Derick