com php-src: Fix failed test with recent glibc: ext/standard/te sts/time/strptime_basic.phpt

From: Date: Wed, 13 Nov 2013 12:19:10 +0000
Subject: com php-src: Fix failed test with recent glibc: ext/standard/te sts/time/strptime_basic.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73949@lists.php.net to get a copy of this message
Commit: 018b9445dadbe37c49dc0bfc909265a295992af6 Author: Remi Collet <remi@php.net> Wed, 13 Nov 2013 13:19:10 +0100 Parents: 1984919ddc3252c0f9b5d5d0beef10bdc4804091 Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=018b9445dadbe37c49dc0bfc909265a295992af6 Log: Fix failed test with recent glibc In recent version of strptime glibc upstream has fixed a discrepancy between documentation and actual behaviour by skipping over the sequence that would match %Z. See http://repo.or.cz/w/glibc.git/commitdiff/ddc7e412ab252e7360a4357664beb3b5d9c4f42b So when %Z is used in format glibc <= 2.18 returns the GMT as unparsed glibc >= 2.19 returns empty string Removing %Z from tested format gives the same behavior with all version. Changed paths: M ext/standard/tests/time/strptime_basic.phpt Diff: diff --git a/ext/standard/tests/time/strptime_basic.phpt b/ext/standard/tests/time/strptime_basic.phpt index 194a78f..30e3e82 100644 --- a/ext/standard/tests/time/strptime_basic.phpt +++ b/ext/standard/tests/time/strptime_basic.phpt @@ -24,7 +24,7 @@ $input = "10:00:00 AM July 2 1963"; $tstamp = strtotime($input); $str = strftime("%r %B%e %Y %Z", $tstamp); -var_dump(strptime($str, '%H:%M:%S %p %B %d %Y %Z')); +var_dump(strptime($str, '%H:%M:%S %p %B %d %Y')); $str = strftime("%T %D", $tstamp); var_dump(strptime($str, '%H:%M:%S %m/%d/%y')); @@ -55,7 +55,7 @@ array(9) { ["tm_yday"]=> int(182) ["unparsed"]=> - string(3) "GMT" + string(4) " GMT" } array(9) { ["tm_sec"]=>

« previous php.cvs (#73949) next »