php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2299 date of year problem
Submitted: 1999-09-14 21:59 UTC Modified: 1999-09-15 05:41 UTC
From: gib at galileo dot jpte dot hu Assigned:
Status: Closed Package: Other
PHP Version: 3.0.12 OS: winnt 4sp5
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: gib at galileo dot jpte dot hu
New email:
PHP Version: OS:

 

 [1999-09-14 21:59 UTC] gib at galileo dot jpte dot hu
<?php

$doy = intval(date("z",mktime(0,0,0,9,14,1999)));
$dos = intval(date("d",mktime(0,0,0,1,$doy,1999)));

echo "1999 september 14 is not equal to 1999 september ".$dos."<br>;

?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-15 05:41 UTC] riffraff at cvs dot php dot net
date("z",...) returns day of year zero-based. but day-of-month
passed to mktime() is one-based. that's the thing, that makes
it differ by one day.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 18 05:01:28 2024 UTC