Bug #67993 [Asn->Opn]: wrong day addition

From: Date: Tue, 24 Oct 2017 08:13:04 +0000
Subject: Bug #67993 [Asn->Opn]: wrong day addition
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212239@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67993&edit=1 ID: 67993 Updated by: kalle@php.net Reported by: luke at woollysheep dot net Summary: wrong day addition -Status: Assigned +Status: Open Type: Bug Package: Date/time related Operating System: Slackware PHP Version: 5.6.0 -Assigned To: derick +Assigned To: Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2015-03-09 15:38:35] nd dot wortel at gmail dot com There seems to be a bug with DateTime objects for December 31st, every 400 years starting 2369. See https://bugs.php.net/bug.php?id=69205 ------------------------------------------------------------------------ [2014-09-10 13:58:56] luke at woollysheep dot net some correction ------------------------------------------------------------------------ [2014-09-10 08:24:32] luke at woollysheep dot net Description: ------------ adding P1D to 2369-12-30 00:00:00 the result is 2370-01-00 really strange day :oD Test script: --------------- --- From manual page: http://www.php.net/datetime.add --- $a = new DateTime("2369-12-30 00:00:00"); $a->add(new DateInterval('P1D')); var_dump($a); will print class DateTime#3 (3) { public $date => string(26) "2370-01-00 00:00:00.000000" public $timezone_type => int(3) public $timezone => string(11) "Europe/Rome" } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67993&edit=1

« previous php.bugs (#212239) next »