com php-src: Bug #66836 has been fixed: NEWS ext/date/tests/bug66836.phpt

From: Date: Mon, 11 Jul 2016 14:06:35 +0000
Subject: com php-src: Bug #66836 has been fixed: NEWS ext/date/tests/bug66836.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92936@lists.php.net to get a copy of this message
Commit: 966311e6274e59d0eabdccf5bf9c5d554c90202c Author: Christoph M. Becker <cmb@php.net> Mon, 11 Jul 2016 16:06:35 +0200 Parents: 2552cf248d6d0e84010f625d89398dfc0b835ef0 Branches: PHP-5.6 PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=966311e6274e59d0eabdccf5bf9c5d554c90202c Log: Bug #66836 has been fixed Bugs: https://bugs.php.net/66836 Changed paths: M NEWS A ext/date/tests/bug66836.phpt Diff: diff --git a/NEWS b/NEWS index 282f20d..2b21a03 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,10 @@ PHP NEWS . Fixed bug #71144 (Segmentation fault when using cURL with ZTS). (maroszek at gmx dot net) +- Date: + . Fixed bug #66836 (DateTime::createFromFormat 'U' with pre 1970 dates fails + parsing). (derick) + - Filter: . Fixed bug #71745 (FILTER_FLAG_NO_RES_RANGE does not cover whole 127.0.0.0/8 range). (bugs dot php dot net at majkl578 dot cz) diff --git a/ext/date/tests/bug66836.phpt b/ext/date/tests/bug66836.phpt new file mode 100644 index 0000000..8fab783 --- /dev/null +++ b/ext/date/tests/bug66836.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #66836 (DateTime::createFromFormat 'U' with pre 1970 dates fails parsing) +--INI-- +date.timezone=Europe/Berlin +--FILE-- +<?php +foreach (['-1', '-86400', '-1000000'] as $timestamp) { + $dt = DateTime::createFromFormat('U', $timestamp); + var_dump($dt->format('U') === $timestamp); +} +?> +--EXPECT-- +bool(true) +bool(true) +bool(true)

« previous php.cvs (#92936) next »