|  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
 [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'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-16 14:23 UTC]
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-2023 The PHP Group
All rights reserved.
Last updated: Fri Jun 02 23:03:39 2023 UTC