php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15808 Date("t",XX) always returning 31
Submitted: 2002-03-01 04:50 UTC Modified: 2002-03-01 08:07 UTC
From: franck dot herzog at cryostar dot fr Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.1.1 OS: Win2000
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: franck dot herzog at cryostar dot fr
New email:
PHP Version: OS:

 

 [2002-03-01 04:50 UTC] franck dot herzog at cryostar dot fr
The function date("t",XX) is always returning 31

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-01 06:52 UTC] sander@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".


Also, what do you mean with XX? A number? The string "XX"?
 [2002-03-01 07:28 UTC] franck dot herzog at cryostar dot fr
Ex: date("t","02");
 [2002-03-01 07:43 UTC] derick@php.net
Not a bug, read the manual more carefully: www.php.net/date
 [2002-03-01 08:07 UTC] hholzgra@php.net
"02" as a timestamp?

thats Jan. 1st 1970 plus 2 seconds minus one hour GMT offset for france, so you get the day number for Dec. 31st 1969, 23:00:02, which indeed *is* 31


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 14:01:27 2025 UTC