php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18289 strftime totally buggy!!
Submitted: 2002-07-11 21:26 UTC Modified: 2005-10-07 23:54 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: eflash at gmx dot net Assigned: derick (profile)
Status: Not a bug Package: Date/time related
PHP Version: 4CVS-2002-07-11 OS: Win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: eflash at gmx dot net
New email:
PHP Version: OS:

 

 [2002-07-11 21:26 UTC] eflash at gmx dot net
on Win32 strftime() doesnt return anything for a bunch of formats; related bug reports:
http://bugs.php.net/bug.php?id=16499
http://bugs.php.net/bug.php?id=16439
http://bugs.php.net/bug.php?id=16498
http://bugs.php.net/bug.php?id=11544
http://bugs.php.net/bug.php?id=15584

Output from testscript:
PHP (4.3.0-dev) says hi to WINNT at July 10, 2002 13:53:21 Westeurop?ische Sommerzeit.

date("D M d, Y H:i:s T") returns: Wed Jul 10, 2002 13:53:21 Westeurop?ische Normalzeit
gmdate("D M d, Y H:i:s T") returns: Wed Jul 10, 2002 11:53:21 GMT Standard Time
strftime("%H:%M:%S") returns: 13:53:21
strftime("%I:%M:%S %p") returns: 01:53:21 PM
strftime("%A") returns: Wednesday
strftime("%a") returns: Wed
strftime("%B") returns: July
strftime("%b") returns: Jul
strftime("%C") returns: 
strftime("%c") returns: 07/10/02 13:53:21
strftime("%D") returns: 
strftime("%d") returns: 10
strftime("%e") returns: 
strftime("%G") returns: 
strftime("%g") returns: 
strftime("%h") returns: 
strftime("%j") returns: 191
strftime("%k") returns: 
strftime("%l") returns: 
strftime("%m") returns: 07
strftime("%P") returns: 
strftime("%p") returns: PM
strftime("%R") returns: 
strftime("%r") returns: 
strftime("%s") returns: 
strftime("%T") returns: 
strftime("%U") returns: 27
strftime("%u") returns: 
strftime("%w") returns: 3
strftime("%X") returns: 13:53:21
strftime("%x") returns: 07/10/02
strftime("%Y") returns: 2002
strftime("%y") returns: 02
strftime("%Z") returns: Westeurop?ische Sommerzeit
strftime("%z") returns: Westeurop?ische Sommerzeit

strftime.php testscript:
<html>
<head>
<title>PHP Time/Date Testpage</title>
</head>
<body>
    PHP (<b><?=PHP_VERSION?></b>) says hi to <b><?=PHP_OS?></b> at <b><?=strftime("%B %d, %Y %H:%M:%S %Z")?></b>.<p>
    date("D M d, Y H:i:s T") returns: <?=date("D M d, Y H:i:s T")?><br> 
    gmdate("D M d, Y H:i:s T") returns: <?=gmdate("D M d, Y H:i:s T")?><br> 
    strftime("%H:%M:%S") returns: <?=strftime("%H:%M:%S")?><br>
    strftime("%I:%M:%S %p") returns: <?=strftime("%I:%M:%S %p")?><br>
    strftime("%A") returns: <?=strftime("%A")?><br>
    strftime("%a") returns: <?=strftime("%a")?><br>
    strftime("%B") returns: <?=strftime("%B")?><br>
    strftime("%b") returns: <?=strftime("%b")?><br>
    strftime("%C") returns: <?=strftime("%C")?><br>
    strftime("%c") returns: <?=strftime("%c")?><br>
    strftime("%D") returns: <?=strftime("%D")?><br>
    strftime("%d") returns: <?=strftime("%d")?><br>
    strftime("%e") returns: <?=strftime("%e")?><br>
    strftime("%G") returns: <?=strftime("%G")?><br>
    strftime("%g") returns: <?=strftime("%g")?><br>
    strftime("%h") returns: <?=strftime("%h")?><br>
    strftime("%j") returns: <?=strftime("%j")?><br>
    strftime("%k") returns: <?=strftime("%k")?><br>
    strftime("%l") returns: <?=strftime("%l")?><br>
    strftime("%m") returns: <?=strftime("%m")?><br>
    strftime("%P") returns: <?=strftime("%P")?><br>
    strftime("%p") returns: <?=strftime("%p")?><br>
    strftime("%R") returns: <?=strftime("%R")?><br>
    strftime("%r") returns: <?=strftime("%r")?><br>
    strftime("%s") returns: <?=strftime("%s")?><br>
    strftime("%T") returns: <?=strftime("%T")?><br>
    strftime("%U") returns: <?=strftime("%U")?><br>
    strftime("%u") returns: <?=strftime("%u")?><br>
    strftime("%w") returns: <?=strftime("%w")?><br>
    strftime("%X") returns: <?=strftime("%X")?><br>
    strftime("%x") returns: <?=strftime("%x")?><br>
    strftime("%Y") returns: <?=strftime("%Y")?><br>
    strftime("%y") returns: <?=strftime("%y")?><br>
    strftime("%Z") returns: <?=strftime("%Z")?><br>
    strftime("%z") returns: <?=strftime("%z")?><br>
    strftime("%+") returns: <?=strftime("%+")?><br>
</body>
</html>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-11 22:20 UTC] sniper@php.net
From the manual:

"Note: Not all conversion specifiers may be supported by 
your C library, in which case they will not be supported by 
PHP's strftime()."

Same thing is said in all of those bug reports you copied there..why did you still submit another one?

 [2002-07-12 05:35 UTC] hholzgra@php.net
#1 blame microsoft
#2 blame microsoft
#3 ...

well, blaming microsoft usualy doesn't help that much,
and as i'm on rewriting part of the locale dependant
stuff anyway i *might* try to bundle some BSD version
of strftime with php instead of relying on libc 
maintainers (esp. in Redmond ;) doing their job 

(assigned to myself, changed status to suspended)
 [2005-10-07 23:54 UTC] derick@php.net
Duplicate of #33445.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 10:01:30 2025 UTC