#42671 [Opn->WFx]: ext/standard/tests/time/002.phpt fails due to AIX not supporting TZ=US/Eastern
| From: | tony2001@php.net | Date: | Tue, 02 Oct 2007 11:58:13 +0000 |
| Subject: | #42671 [Opn->WFx]: ext/standard/tests/time/002.phpt fails due to AIX not supporting TZ=US/Eastern | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-118087@lists.php.net to get a copy of this message | ||
ID: 42671
Updated by: tony2001@php.net
Reported By: ppryor at pobox dot com
-Status: Open
+Status: Wont fix
Bug Type: Date/time related
Operating System: AIX 5.2
PHP Version: 4.4.7
New Comment:
Forget about 4.4.7, there is no point in fixing something that will
become officially unsupported in a couple of months.
Previous Comments:
------------------------------------------------------------------------
[2007-09-14 15:04:04] ppryor at pobox dot com
I found same problem with ext/standard/tests/time/bug13142.phpt, so I
modified the test case as follows:
Original
putenv("TZ=US/Eastern");
if (date('T') == 'GMT') {
putenv("TZ=EST5EDT4,M4.1.0,M10.5.0");
}
Revised
putenv("TZ=US/Eastern");
if (date('T') == 'GMT' || date('T') == ' ') {
putenv("TZ=EST5EDT4,M4.1.0,M10.5.0");
}
Then it will pass the test.
------------------------------------------------------------------------
[2007-09-14 14:50:46] ppryor at pobox dot com
Description:
------------
The test script, ext/standard/tests/time/002.phpt always fails on AIX
because AIX does not support setting of TZ to US/Eastern, and the if
statement that checks for this situation fails.
Orignal code in test case:
putenv("TZ=US/Eastern");
if( date("T") == "GMT" ) {
// POSIX style
putenv ("TZ=EST5EDT4,M4.1.0,M10.5.0");
}
should be modified as follows:
putenv("TZ=US/Eastern");
if( date("T") == "GMT" || date("T") == " " ) {
// POSIX style
putenv ("TZ=EST5EDT4,M4.1.0,M10.5.0");
}
Then it will pass the test. IMHO this problem applies to several
platforms, not just AIX. The function date("t") could return a string of
three spaces under certain circumstances.
Reproduce code:
---------------
base=
pwd
cd ext/standard/tests/time
export TEST_PHP_EXECUTABLE=$base/sapi/cli/php
$TEST_PHP_EXECUTABLE $base/run-tests.php 002.phpt
Expected result:
----------------
=====================================================================
CWD : /home/ppryor/php-4.4.7/ext/standard/tests/time
PHP : /home/ppryor/php-4.4.7/sapi/cli/php
PHP_SAPI : cli
PHP_VERSION : 4.4.7
ZEND_VERSION: 1.3.0
PHP_OS : AIX - AIX EFT_QA02 2 5 00015D2A4C00
INI actual :
More .INIs :
Extra dirs :
=====================================================================
Running selected tests.
PASS strtotime() function [002.phpt]
Actual result:
--------------
=====================================================================
CWD : /home/ppryor/php-4.4.7/ext/standard/tests/time
PHP : /home/ppryor/php-4.4.7/sapi/cli/php
PHP_SAPI : cli
PHP_VERSION : 4.4.7
ZEND_VERSION: 1.3.0
PHP_OS : AIX - AIX EFT_QA02 2 5 00015D2A4C00
INI actual :
More .INIs :
Extra dirs :
=====================================================================
Running selected tests.
FAIL strtotime() function [002.phpt]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42671&edit=1