|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-08-17 22:09 UTC] 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:
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 23 22:00:02 2025 UTC |
You could perhaps use the following test to avoid running into this problem: if (stristr(php_uname('s'), 'WIN')) { // Are we running under Windows? // %e conversion specifier not supported, use %#d instead } else { // OK to use %e } Hope that helps!