From:             joho at webbplatsen dot se
Operating system: SuSE Linux 8.x, 2.4.19-4GB kerne
PHP version:      4.3.3
PHP Bug Type:     Unknown/Other Function
Bug description:  Locale-specific formats of strftime() do not work

Description:
------------
After upgrading our system to PHP 4.3.2, setlocate() no longer seemed to
have any effect. I later upgraded to PHP 4.3.3 but find the same problem
present. No compile-time problems are reported.

Uppercase/lowercase of Swedish national characters no longer works either.

Reproduce code:
---------------
Code from the PHP manual (fails):

/* Set locale to Dutch */
setlocale (LC_ALL, 'nl_NL');

/* Output: vrijdag 22 december 1978 */
echo strftime ("%A %e %B %Y", mktime (0, 0, 0, 12, 22, 1978));

/* try different possible locale names for german as of PHP 4.3.0 */
$loc_de = setlocale (LC_ALL, '[EMAIL PROTECTED]', 'de_DE', 'de', 'ge');
echo "Preferred locale for german on this system is '$loc_de'";

Own code (fails):

        setlocale (LC_ALL, 'sv_SV');
        return
            (
            ucfirst (strftime ("%a")) .
            " " .
            date ("Y-m-d") .
            " ".
            "V." .
            strftime ("%V")
            );



Expected result:
----------------
Own code should result in this:

Tis 2003-09-30 V.40

(if run on 2003-09-30, that is ;)


Actual result:
--------------
Tue 2003-09-30 V.40

And no, I am not certain I have not done something wrong, but since this
behavior changed after we installed 4.3.2.. ???


-- 
Edit bug report at http://bugs.php.net/?id=25697&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25697&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25697&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25697&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25697&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25697&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25697&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25697&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25697&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25697&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25697&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25697&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25697&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25697&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25697&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25697&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25697&r=float

Reply via email to