Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122441 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 qa.php.net (Postfix) with ESMTPS id CB1A51ACEBF for ; Tue, 20 Feb 2024 11:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1708429272; bh=AG6W88aHn2bC2cS+MR5i3VzZaZ0BzNrRJmPhFpu0UoE=; h=Date:From:To:Subject:In-Reply-To:References:From; b=CjjzJURT45ggHblndfxs0JIHsFEAXKuqjENsIaqHp6Huai0712/VIwOVXxwgkCBQO IPmtXF6larZVY7VfmxV7LYkwQLZq8BKCyswXNK2Yek+6IKGMRGI409lnJNngsZn1tJ CsW3Yh1T/o97EDDH8wluzU4z4yChle1vSCccZ5GutGhtFE+t7pEuaDjc+G7GbHJ9jY IwYLDw995fiu7BgJ7g+KyXohCGCn7wlvzw/WSIg+//XU4kSD/pya9pHZ5/ENHsPiz8 PGP9M0w4W8It1RstLiWlZPuDJ7P9nCFj3GepfbAf/l92adpq2T/c2vt5g2DvsYozqk yLhjSS9mMSu+Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9AA4F18006A for ; Tue, 20 Feb 2024 11:41:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_05,DMARC_MISSING, SPF_HELO_PASS,SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Tue, 20 Feb 2024 03:41:09 -0800 (PST) Received: from [127.0.0.1] (unknown [148.252.132.126]) by xdebug.org (Postfix) with ESMTPSA id 9A6A210C51E; Tue, 20 Feb 2024 11:41:04 +0000 (GMT) Date: Tue, 20 Feb 2024 12:41:03 +0100 To: internals@lists.php.net, Marc Bennewitz Subject: Re: [PHP-DEV] Requesting RFC karma User-Agent: K-9 Mail for Android In-Reply-To: <70da7d53-5f0b-4177-84e7-29fa43b96949@mabe.berlin> References: <176d0694-8b9b-4aa2-abea-9bfe8225b713@mabe.berlin> <70da7d53-5f0b-4177-84e7-29fa43b96949@mabe.berlin> Message-ID: Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: derick@php.net (Derick Rethans) On 20 February 2024 10:05:25 CET, Marc Bennewitz wrote= : > >On 20=2E02=2E24 09:58, Derick Rethans wrote: >> On 20 February 2024 08:41:19 GMT, Marc Bennewitz w= rote: >>> Hi Hans, >>>=20 >>> On 16=2E02=2E24 13:05, Hans Henrik Bergan wrote: >>>> My name is "Hans Henrik Bergan", usually go by the nickname >>>> "divinity76", I've contributed to OSS (including PHP) for years, and >>>> am currently involved in 3 things that might require an RFC, and >>>> requesting RFC karma for wiki account "divinity76"=2E >>>>=20 >>>> 3/3: int|float for DateTime::setTimestamp, setTimestamp(0=2E123456) = =3D> >>>> 1970-01-01 00:00:00=2E123456 :https://github=2Ecom/php/php-src/pull/1= 3383 >>> Actually I also want to work on this if I find time =2E=2E=2E but as t= his is a BC break I think it makes sense to revisit DateTime (and friends) = to bundle BC breaks to a single PHP version - probably PHP 9 and more sure = there is a way for users to make it work in PHP (7+)8+9=2E >>>=20 >>> Personal and incomplete list I think needs improvements: >>>=20 >>> * allow float for `setTimestamp` >>> * option to return timestamp as float to simplify passing it to JS >>> * Missing getter/setter for most of the date/time parts like `get/setS= econd`, `get/setHour` etc=2E >>> =C2=A0 * For now I only added `get/setMicroseconds` together with `cr= eateFromTimestamp` because `DateTime::createFromTimestamp(123456789)->setMi= croseconds(123987)` >>> =C2=A0 * After thinking about naming - I think this should be renamed= to singular =F0=9F=98=AC >>> * Add missing methods to DateTimeInterface >>> * Allow userland implements DateTimeInterface >>> =C2=A0 * Define how `createFromInterface` behaves on userland impleme= ntations >>> * fixing ISO 8601 format >>> * fixing some return type definitions from self to static >>> * strict mode >>> =C2=A0 * `DateTime::createFromFormat('Y-m-d', '2023-02-29')` >>> =C2=A0 * `DateTime::createFromFormat('Y-m-d H:i', '2024-03-31 02:30',= new DateTimeZone('Europe/Berlin'))` >>> * Missing current microseconds on `createFromFormat` but other non def= ined parts needs to be explicitly reset using `|!` >>> * leap seconds support on UTC TZ >>> =C2=A0 * As of leap seconds =2E=2E=2E wouldn't it be better to defaul= t to +00:00 instead of UTC ? >>> * Support nanoseconds >>>=20 >>>=20 >>> I'm for sure not able to work on all these points and that's why I onl= y started very small close to no BC improvements without RFC=2E >>>=20 >> IMO, doing tweaks to this base functionality isn't the way forwards=2E = I've been having on and off conversations with Florian over the last couple= of months to see if we can design a better higher level API instead of pat= ching the nits=2E > >Do you mean adding an additional API in C or userland? Is there a way to = participate on the discussion? A bit of both, I suppose=2E But mainly for a user facing API=2E I've nothi= ng concrete yet, and will soon start collecting thoughts=2E I'll make sure = to email this list=2E cheers Derick