#34013 [Asn->Bgs]: setlocale used from php-cli does not set locale
| From: | derick@php.net | Date: | Sat, 06 Aug 2005 10:38:09 +0000 |
| Subject: | #34013 [Asn->Bgs]: setlocale used from php-cli does not set locale | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83087@lists.php.net to get a copy of this message | ||
ID: 34013
Updated by: derick@php.net
Reported By: wim dot delvaux at adaptiveplanet dot com
-Status: Assigned
+Status: Bogus
Bug Type: Date/time related
Operating System: debian sed
PHP Version: 5.0.4
Assigned To: derick
New Comment:
date() never supported locale aware month names, use strftime() for
that.
Previous Comments:
------------------------------------------------------------------------
[2005-08-06 11:59:54] nlopess@php.net
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 :)
------------------------------------------------------------------------
[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