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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC