|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-07 11:05 UTC] derick@php.net
[2006-03-07 16:55 UTC] julientld at free dot fr
[2006-03-07 20:52 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 03:00:01 2025 UTC |
Description: ------------ Hello, Finally I decide to submit here a problem that I obtain with PHP from a lot of years. So I have had this problem with PHP 4.x and Windows 2000 (IIS 5.0) and yet with PHP 5.x and Windows Server 2003 (IIS 6.0). My problem is related to the function strftime() which I use to display dates in my language (French). Sometimes, dates are displayed in French like I want and sometimes dates are displayed in English without any modification of the code. If I refresh the same page 20 times, per exemple, the date will be in English 2 or 3 times and in French the rest of the times. It's very strange and I do not understand why! It just seems to be a bug, no? For setting the local time, I use setlocale(LC_ALL,"fra"); (I tried also setlocale(LC_ALL,"fr_FR"); and other variants). The function setlocale(LC_ALL,"fra"); is present in an included file which is ever called at the top of the page. In the release notes of PHP 5.1, I seen that a new parameter in the php.ini has been added to set the time zone (I set it to Europe/Paris). I hoped it's will help me to resolve the problem but not :-( I seen other persons that have problems with setlocale() and included files. Do you know if it is a PHP bug or a problem in my scripts? Thanks Reproduce code: --------------- echo (strftime("%A %d %B %Y",$timestamp_from_database->date));