php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50217 strftime: plattform specifics
Submitted: 2009-11-18 12:22 UTC Modified: 2009-11-18 13:22 UTC
From: none at here dot com Assigned: rquadling (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2009-11-18 12:22 UTC] none at here dot com
Description:
------------
please add to the documentation for strftime(), that for unsupported conversion specifiers, the conversion might fail completely and return an empty string. 

on linux:
echo "x" . strftime("%m %C") . "x";
> "xNovember 09x"

on windows:
echo "x" . strftime("%m %C") . "x";
> "xx"
and NOT as expected "xNovember x" with just the second conversion missing.

ideally, the conversion specifier list could list if it's available on a specific platform. for people porting code from win to linux, this is a cruicial issue...

thanks & keep up the great work!







Reproduce code:
---------------
---
From manual page: function.strftime#Description
---

see description

Expected result:
----------------
see description


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-18 12:47 UTC] rquadling@php.net
If you turn on E_WARNINGS, you will get 5 warnings.


Warning: Invalid CRT parameters detected in Command line code on line 1

Warning: Invalid CRT parameters detected in Command line code on line 1

Warning: Invalid CRT parameters detected in Command line code on line 1

Warning: Invalid CRT parameters detected in Command line code on line 1

Warning: Invalid CRT parameters detected in Command line code on line 1


Also, %m = 11, not November, which is %B
 [2009-11-18 13:21 UTC] svn@php.net
Automatic comment from SVN on behalf of rquadling
Revision: http://svn.php.net/viewvc/?view=revision&revision=290910
Log: Document different errors and output for Windows when supplying unknown specifiers. Fix #50217
 [2009-11-18 13:22 UTC] rquadling@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of rquadling
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=d8bf844239cbef43989b1c6ff1a7b1309372aded
Log: Document different errors and output for Windows when supplying unknown specifiers. Fix #50217
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 23:00:01 2026 UTC