php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10907 date() bug...
Submitted: 2001-05-16 14:21 UTC Modified: 2001-05-16 14:23 UTC
From: skysign at dreamwiz dot com Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0.5 OS: Redhat 7.0 kernel 2.2.16
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: skysign at dreamwiz dot com
New email:
PHP Version: OS:

 

 [2001-05-16 14:21 UTC] skysign at dreamwiz dot com
date() function does not work well

this code shown the date() function bug...

<?
$date = date("Y.m.t");

echo $date;
?>

Result of above code is only "2001.05.31".

it's incorrect... correct result is "2001.5.17"

linux console command "date" work correctly...

===========================================================
My php Configure Line

./configure' '--with-apache=/usr/local/src/apache_1.3.19' '--with-sybase=/usr/local/freetds' '--enable-track-vars' '--disable-debug' '--enable-sysvsem' '--enable-sysvshm' '--enable-shmop'
===========================================================

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-16 14:23 UTC] rasmus@php.net
Please read the documentation more closely.  The t modifier is the number of days in the month so 31 is indeed correct.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 24 00:03:50 2022 UTC