Edit report at http://bugs.php.net/bug.php?id=45847&edit=1

 ID:               45847
 Comment by:       cyrille37 at gmail dot fr
 Reported by:      vincent at vent dot be
 Summary:          strftime() returns an empty string when using the %e
                   conversion specifier
 Status:           Assigned
 Type:             Bug
 Package:          Date/time related
 Operating System: win32 only
 PHP Version:      5.2.6
 Assigned To:      derick

 New Comment:

strftime() is not portable, so for Win32 have a look at 

 http://msdn.microsoft.com/en-us/library/fe06s4ak%28VS.71%29.aspx

You could not find %e but ...

there is the formater char "#" that can Remove leading zeros (if any).



Replace "%e" by "%#d", it's work !



Cyrille.


Previous Comments:
------------------------------------------------------------------------
[2008-08-17 22:56:50] paj...@php.net

%e is not supported on Windows. strftime PHP's implementation is not
portable. Assigned to the maintainer, if he likes to comment more or
make it portable.



See:



http://msdn.microsoft.com/en-us/library/fe06s4ak(VS.71).aspx



for the list of supported identifiers.

------------------------------------------------------------------------
[2008-08-17 22:09:42] vincent at vent dot be

Description:
------------
When I use the strftime() function to format a date, it returns an empty
string when I use the %e conversion specifier in the formatting string.



I'm using the newest version of the WAMPSERVER package (with Apache
2.2.8).



I hope this helps you any further, do not hesitate to contact me if you
have further questions. Thanks!



-Vincent

Reproduce code:
---------------
<?PHP

$time = mktime();

echo "This does not work: " . strftime("%e", $time);

echo ", while dis does work: " . strftime("%d", $time);

echo ". Adding parameters doesn't fix the problem: " . strftime("%A %e
%B %Y", $time);

?>

Expected result:
----------------
This does not work: 18, while dis does work: 18. Adding parameters
doesn't fix the problem: Monday 18 August 2008

Actual result:
--------------
This does not work: , while dis does work: 18. Adding parameters doesn't
fix the problem: 


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=45847&edit=1

Reply via email to