|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-03-10 09:18 UTC] claus at marcussen dot eu
[2012-03-10 12:50 UTC] claus at marcussen dot eu
-Status: Open
+Status: Closed
[2012-03-10 12:50 UTC] claus at marcussen dot eu
[2012-03-10 19:21 UTC] cataphract@php.net
-Status: Closed
+Status: Not a bug
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 11:00:01 2025 UTC |
Description: ------------ 'strftime' don't work correct when 'setlocale(LC_ALL, 'da_DK');' are done. Test script: --------------- $Dato1 = '2012-04-21'; $Dato2 = '2012-04-22'; $Dato3 = '2012-04-23'; $DatoStr1 = strtotime($Dato1); $DatoStr2 = strtotime($Dato2); $DatoStr3 = strtotime($Dato3); echo htmlentities(ucfirst(strftime('%A d. %d.', $DatoStr1)), ENT_QUOTES, "UTF-8") . ' ' . $DatoStr1 . '<br/>'; echo htmlentities(ucfirst(strftime('%A d. %d.', $DatoStr2)), ENT_QUOTES, "UTF-8") . ' ' . $DatoStr2 . '<br/>'; echo htmlentities(ucfirst(strftime('%A d. %d.', $DatoStr3)), ENT_QUOTES, "UTF-8") . ' ' . $DatoStr3 . '<br/>'; echo '<br/>'; setlocale(LC_ALL, 'da_DK'); $Dato1 = '2012-04-21'; $Dato2 = '2012-04-22'; $Dato3 = '2012-04-23'; $DatoStr1 = strtotime($Dato1); $DatoStr2 = strtotime($Dato2); $DatoStr3 = strtotime($Dato3); echo htmlentities(ucfirst(strftime('%A d. %d.', $DatoStr1)), ENT_QUOTES, "UTF-8") . ' ' . $DatoStr1 . '<br/>'; echo htmlentities(ucfirst(strftime('%A d. %d.', $DatoStr2)), ENT_QUOTES, "UTF-8") . ' ' . $DatoStr2 . '<br/>'; echo htmlentities(ucfirst(strftime('%A d. %d.', $DatoStr3)), ENT_QUOTES, "UTF-8") . ' ' . $DatoStr3 . '<br/>'; Expected result: ---------------- The same result (excl. language).