#47128 [Opn->Bgs]: NLS_DATE_FORMAT

From: Date: Sun, 18 Jan 2009 23:12:08 +0000
Subject: #47128 [Opn->Bgs]: NLS_DATE_FORMAT
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-132992@lists.php.net to get a copy of this message
ID: 47128 Updated by: jani@php.net Reported By: iteam dot soft at gmail dot com -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Red Hat 8.0 PHP Version: 5.2.8 New Comment: And you immediately assume your bad configuration is a bug in PHP..pff.. Previous Comments: ------------------------------------------------------------------------ [2009-01-16 14:55:23] iteam dot soft at gmail dot com Description: ------------ For about a week ago I had installed on my box Apache 2.2.10 with PHP 5.2.7. Beside this the php was compiled with FirebirdSql and Oracle Instant Client. On apache start I put a env variabile export NLS_DATE_FORMAT=DD.MM.YYYY On my application start point from PHP I also double ensure the NLS_DATE_FORMAT it's set so I put also putenv('NLS_DATE_FORMAT=DD.MM.YYYY'); Everything was ok and my application display the date format from oracle as I set it. All good. Last week ... I made upgrade to Apache 2.2.11 and PHP 5.28. After upgrade nothing change to my application or configuration only this applications (apacheand and php) as I mentioned above. From this point the date format that I was getting from Oracle was NOT what I set. The returned date format was in Oracle standard DD-M-RR. So I try everything .. recheck ... reset env variables .. put extra configuration for php ... but no result. The same bad date. I know I could use the alter session as a work-arround ... but this envolves running the alter session eache time user wants information from the database. The application it's huge and with a lot of users and it's running on the intranet system. So I preffer the PUTENV method. So all was ok until the upgrade from apache 2.2.10 to 2.2.11 and php 5.2.7 to 5.2.8 Reproduce code: --------------- I try all this ... at once and one by one ... no result. $_ENV["NLS_DATE_FORMAT"] = 'DD.MM.YYYY'; putenv('NLS_DATE_FORMAT=DD.MM.YYYY'); apache_setenv('NLS_DATE_FORMAT=DD.MM.YYYY'); Expected result: ---------------- The Oracle date format to be: 22.01.2009 Actual result: -------------- 22-JAN-09 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47128&edit=1

« previous php.bugs (#132992) next »