From: ppryor at pobox dot com
Operating system: AIX 5.2
PHP version: 4.4.7
PHP Bug Type: Date/time related
Bug description: ext/standard/tests/time/002.phpt fails due to AIX not
supporting TZ=US/Eastern
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 bug report at http://bugs.php.net/?id=42671&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=42671&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=42671&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=42671&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42671&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=42671&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42671&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42671&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42671&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42671&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42671&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=42671&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=42671&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42671&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42671&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42671&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42671&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42671&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42671&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42671&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42671&r=mysqlcfg