#34013 [Fbk->Asn]: setlocale used from php-cli does not set locale
| From: | nlopess@php.net | Date: | Sat, 06 Aug 2005 09:59:55 +0000 |
| Subject: | #34013 [Fbk->Asn]: setlocale used from php-cli does not set locale | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83085@lists.php.net to get a copy of this message | ||
ID: 34013
Updated by: nlopess@php.net
Reported By: wim dot delvaux at adaptiveplanet dot com
-Status: Feedback
+Status: Assigned
-Bug Type: CGI related
+Bug Type: Date/time related
Operating System: debian sed
PHP Version: 5.0.4
-Assigned To:
+Assigned To: derick
New Comment:
The date() function doesn't work with locales. The month names are
hardcoded in the sources.
I'm not sure if Derick will change this, but let him speak :)
Previous Comments:
------------------------------------------------------------------------
[2005-08-05 21:00:44] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
And check that you have this locale first with:
locale -a | grep nl
------------------------------------------------------------------------
[2005-08-05 20:56:52] wim dot delvaux at adaptiveplanet dot com
Description:
------------
setlocale used from apache module seems to work
however using the same setlocale
setlocale( LC_TIME, 'nl_NL' );
in a php script started from the command line
does not work (i.e. month names are not NL but remain EN
Reproduce code:
---------------
<?php
setlocale( LC_TIME, 'nl_NL' );
print( date('F')."\n" );
?>
produces
August
and not
Augustus
Expected result:
----------------
Should output Augustus
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34013&edit=1