Bug #67993 [NEW]: wrong day addiction
From: luke at woollysheep dot net
Operating system: Slackware
PHP version: 5.6.0
Package: Date/time related
Bug Type: Bug
Bug description:wrong day addiction
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 bug report at https://bugs.php.net/bug.php?id=67993&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67993&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67993&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67993&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67993&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67993&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67993&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67993&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67993&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67993&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67993&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67993&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67993&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67993&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67993&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67993&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67993&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67993&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67993&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67993&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67993&r=mysqlcfg
Thread (5 messages)
- luke at woollysheep dot net