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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 09:01:30 2025 UTC