Req #64767 [Opn->Sus]: DateInterval::format Inconsistant

From: Date: Wed, 13 Jan 2021 15:02:39 +0000
Subject: Req #64767 [Opn->Sus]: DateInterval::format Inconsistant
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231539@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64767&edit=1 ID: 64767 Updated by: cmb@php.net Reported by: brent dot hansen at gmail dot com Summary: DateInterval::format Inconsistant -Status: Open +Status: Suspended Type: Feature/Change Request Package: Date/time related Operating System: All PHP Version: Irrelevant Block user comment: N Private report: N New Comment: I don't think that this can be changed for BC reasons. If you feel strongly that it should be done nonetheless, please pursue the RFC process[1]. For the time being, I'm suspending this ticket. [1] <https://wiki.php.net/rfc/howto> Previous Comments: ------------------------------------------------------------------------ [2013-05-03 18:07:39] brent dot hansen at gmail dot com Changing to request instead of bug. ------------------------------------------------------------------------ [2013-05-03 00:03:23] brent dot hansen at gmail dot com Description: ------------ DateInterval::format() does not follow standard like DateTime & Date. Need to use new format. What used to be H:i:s for formatting now needs H:I:S Test script: --------------- $interval = new DateInterval('P2Y4DT6H8M'); echo $interval->format("%Y-%m-%d %H:%i:%s"); Expected result: ---------------- 02-00-04 06:08:00 Actual result: -------------- 02-0-4 06:8:0 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64767&edit=1

« previous php.bugs (#231539) next »