php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3078 date problem: no 29 Februari 2000
Submitted: 2000-01-01 08:45 UTC Modified: 2000-01-02 16:55 UTC
From: auke at muze dot nl Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Beta 3 OS: Linux, probably all
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: auke at muze dot nl
New email:
PHP Version: OS:

 

 [2000-01-01 08:45 UTC] auke at muze dot nl
  $lastday=mktime(0,0,0,3,-1,2000);
  echo strftime("Last day in februari 2000 is : %d<br>",$lastday);

This short script displays '28' on my system. Februari 2000 has 29 days however. I'm not sure where this bug comes from, 'cal' displays februari 2000 correctly with 29 days.

I've observed the same problem with PHP 3.0.5 on solaris 2.6


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-02 16:55 UTC] jah at cvs dot php dot net
The last day of a month is expressed as the zeroth day of the next month,
not -1th.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 13:00:02 2026 UTC