Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3

  • Loading branch information...
commit d86decd7b4ed11305fde0cad9163a1941101cd0b 2 parents fa7e230 + 22fe268
@laruence laruence authored
View
8 NEWS
@@ -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)
View
2  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`
View
2  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;
View
4 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
View
16 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
View
6 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
View
4 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";
}
View
4 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') {
Please sign in to comment.
Something went wrong with that request. Please try again.