diff options
author | Xinchen Hui <laruence@php.net> | 2012-12-10 18:28:26 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2012-12-10 18:28:26 +0800 |
commit | d86decd7b4ed11305fde0cad9163a1941101cd0b (patch) | |
tree | 8991b0973e61e1ad32353460d53a01e04c5654f5 | |
parent | fa7e230c76ddbd1d8e9dff0cfb1c998525873733 (diff) | |
parent | 22fe268ad4c22ec55bc2c74db18b3cae8f8a6176 (diff) | |
download | php-git-d86decd7b4ed11305fde0cad9163a1941101cd0b.tar.gz |
Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | ext/date/php_date.c | 2 | ||||
-rw-r--r-- | ext/date/tests/bug45554.phpt | 4 | ||||
-rw-r--r-- | ext/date/tests/bug63435.phpt | 16 | ||||
-rw-r--r-- | main/php_version.h | 6 | ||||
-rw-r--r-- | tests/lang/034.phpt | 4 | ||||
-rw-r--r-- | tests/lang/bug30638.phpt | 4 |
8 files changed, 39 insertions, 7 deletions
@@ -1,7 +1,11 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| +?? ??? 2013, PHP 5.3.21 + ?? ??? 2012, PHP 5.3.20 +#### ADD NEWS TO 5.3.21 ONLY #### + - Zend Engine: . Fixed bug #63635 (Segfault in gc_collect_cycles). (Dmitry) . Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes @@ -18,6 +22,10 @@ PHP NEWS - Apache2 Handler SAPI: . Enabled Apache 2.4 configure option for Windows (Pierre, Anatoliy) +- Date: + . Fixed bug #63435 (Datetime::format('u') sometimes wrong by 1 microsecon). + (Remi) + - Fileinfo: . Fixed bug #63248 (Load multiple magic files from a directory under Windows). (Anatoliy) diff --git a/configure.in b/configure.in index 66900b455c..72cdee53d9 100644 --- a/configure.in +++ b/configure.in @@ -41,7 +41,7 @@ AC_CONFIG_HEADER(main/php_config.h) PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=3 -PHP_RELEASE_VERSION=20 +PHP_RELEASE_VERSION=21 PHP_EXTRA_VERSION="-dev" PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION" PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` diff --git a/ext/date/php_date.c b/ext/date/php_date.c index e8a457052e..47b79bc250 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1095,7 +1095,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca case 'H': length = slprintf(buffer, 32, "%02d", (int) t->h); break; case 'i': length = slprintf(buffer, 32, "%02d", (int) t->i); break; case 's': length = slprintf(buffer, 32, "%02d", (int) t->s); break; - case 'u': length = slprintf(buffer, 32, "%06d", (int) floor(t->f * 1000000)); break; + case 'u': length = slprintf(buffer, 32, "%06d", (int) floor(t->f * 1000000 + 0.5)); break; /* timezone */ case 'I': length = slprintf(buffer, 32, "%d", localtime ? offset->is_dst : 0); break; diff --git a/ext/date/tests/bug45554.phpt b/ext/date/tests/bug45554.phpt index 0e9ebfd140..a5042ffb1c 100644 --- a/ext/date/tests/bug45554.phpt +++ b/ext/date/tests/bug45554.phpt @@ -9,12 +9,12 @@ $d = date_create_from_format($format, "03-15-2005 12:22:29.000000 PST"); echo $d->format($format), "\n"; $d = date_create_from_format($format, "03-15-2005 12:22:29.001001 PST"); -echo $d->format($format), " (precision isn't enough to show the 1 here)\n"; +echo $d->format($format), "\n"; $d = date_create_from_format($format, "03-15-2005 12:22:29.0010 PST"); echo $d->format($format), "\n"; ?> --EXPECT-- 03-15-2005 12:22:29.000000 PST -03-15-2005 12:22:29.001000 PST (precision isn't enough to show the 1 here) +03-15-2005 12:22:29.001001 PST 03-15-2005 12:22:29.001000 PST diff --git a/ext/date/tests/bug63435.phpt b/ext/date/tests/bug63435.phpt new file mode 100644 index 0000000000..dcec6e46e7 --- /dev/null +++ b/ext/date/tests/bug63435.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #63435 Datetime::format('u') sometimes wrong by 1 microsecond +--INI-- +date.timezone=UTC +--FILE-- +<?php +for ($i=1 ; $i<999 ; $i++) { + $datetime = Datetime::createFromFormat("u", sprintf("%06ld", $i)); + $res = $datetime->format("u"); + if ($res != $i) { + echo "$i != $res\n"; + } +} +echo "Done"; +--EXPECT-- +Done diff --git a/main/php_version.h b/main/php_version.h index 331f30a051..f34c957567 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.in to change version number */ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 -#define PHP_RELEASE_VERSION 20 +#define PHP_RELEASE_VERSION 21 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "5.3.20-dev" -#define PHP_VERSION_ID 50320 +#define PHP_VERSION "5.3.21-dev" +#define PHP_VERSION_ID 50321 diff --git a/tests/lang/034.phpt b/tests/lang/034.phpt index 5d2c610926..cea0797d69 100644 --- a/tests/lang/034.phpt +++ b/tests/lang/034.phpt @@ -4,6 +4,10 @@ Bug #12647 (Locale settings affecting float parsing) precision=14 --SKIPIF-- <?php # try to activate a german locale +if (substr(PHP_OS, 0, 3) == 'WIN') { + /* skip on windows until #63688 was fixed */ + die('skip'); +} if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) { print "skip Can't find german locale"; } diff --git a/tests/lang/bug30638.phpt b/tests/lang/bug30638.phpt index 30b70f30fb..945a228eda 100644 --- a/tests/lang/bug30638.phpt +++ b/tests/lang/bug30638.phpt @@ -2,6 +2,10 @@ Bug #30638 (localeconv returns wrong LC_NUMERIC settings) (ok to fail on MacOS X) --SKIPIF-- <?php # try to activate a german locale +if (substr(PHP_OS, 0, 3) == 'WIN') { + /* skip on windows until #63688 was fixed */ + die('skip'); +} if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) { print "skip setlocale() failed"; } elseif (strtolower(php_uname('s')) == 'darwin') { |