php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15584 strftime("%D") problem
Submitted: 2002-02-15 23:40 UTC Modified: 2002-06-17 15:15 UTC
From: holliwell at gmx dot net Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.1.1 OS: win2k
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: holliwell at gmx dot net
New email:
PHP Version: OS:

 

 [2002-02-15 23:40 UTC] holliwell at gmx dot net
Hi,
Running Win2k AS, Apache 1.3.23, PHP-Modul.

Had some problems with strftime("%D");

<?php
print (strftime("%m/%d/%y"));//outputs 02/16/02
echo "<br>";
print print (strftime("%D")); //outputs nothing
?> 

should both return the same result, the first displays nothing (empty string), the second one is working fine. The manual says for conversion specifiers:
%D - same as %m/%d/%y

Tried the same on a linux-box at my ISP (4.1.0, Apache 1.3.22, Kernel  2.2.19, Modulversion):

<?php
print (strftime("%m/%d/%y")); //outputs 02/16/02
echo "<br>";
print print (strftime("%D")); //02/16/021
?>

So my conclusion : strftime("%D") doesn?t work on win2k and seems to be broken on linux.

Thanks
Friedhelm Betz 

P.S.:
On win2k standard Installation, no extra extensions enabled.
The configure at th elinux-box from ISP:
'./configure' '--with-config-file-path=/etc' '--enable-xslt' '--with-xslt-sablot' '--with-mysql=/usr/local/mysql' '--with-mcrypt=/usr/local' '--with-apache=../apache_current' '--with-ttf=/usr/local' '--with-t1lib=/usr/local' '--with-gd=/usr/' '--enable-gd-native-ttf' '-with-pdflib' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/lib' '--with-tiff-dir=/usr/local/lib' '--with-imap=/usr/local' '--with-java=/usr/local/java2' '--with-zlib' '--with-dom' '--with-ming' '--with-swf=/usr/local' '--enable-bcmath' '--enable-ftp' '--enable-calendar' '--enable-memory-limit' '--enable-discard-path'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-16 05:02 UTC] sander@php.net
print print (strftime("%D"));????????
One print will do the job!
print strftime("%D");
 [2002-02-16 10:37 UTC] holliwell at gmx dot net
Hi,
sorry for the typo :-(.
print (strftime("%D"));has the expected result on Linux box.
but still not on windows.

Friedhelm Betz
 [2002-02-16 10:43 UTC] sander@php.net
I don't have a windows-box right now, so i'm reopening this one...
 [2002-02-17 07:32 UTC] sander@php.net
Reproduced with a recent 4.2.0-dev.
 [2002-06-17 15:15 UTC] hholzgra@php.net
see http://php.net/strftime

some % placeholders are not supported an all platforms,
esp. on windows

might change in the future by bundling strftime 
implementation with PHP, but this has already be noted
elsewhere, so closing
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 22:01:30 2024 UTC