php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9966 date(today) and date(tomorrow) return twice the same date
Submitted: 2001-03-24 04:44 UTC Modified: 2001-04-01 10:50 UTC
From: leonardo at pcnet dot ro Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0.4pl1 OS: Windows 2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: leonardo at pcnet dot ro
New email:
PHP Version: OS:

 

 [2001-03-24 04:44 UTC] leonardo at pcnet dot ro
I made a script that loops through a week ahead (starting from 19 of March 2001 and includind the week of 19-25 of March 2001) and reads the data from a database according to the date. I've noticed the '2001-03-24' is returned twice using the following script:

for($i = 0; $i < 6; $i++)
{
   $next_date = date("Y-m-d", mktime(0,0,0,date("m"),date("d")+$i,date("Y")));
   print $next_date;
}

The script returns the same date with PHP 4.0.4 on IIS and Apache for Windows.
										

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-25 10:21 UTC] jah@php.net
You have just discovered daylight savings time...
 [2001-03-26 04:22 UTC] leonardo at pcnet dot ro
yeah, right... but what is the cure for this situation ? i mean i don't want to screw up my scripts because a common daylight saving time. i don't know if you know what i mean... it's just... silly
 [2001-04-01 10:50 UTC] leonardo at pcnet dot ro
well, thanks... that is more than a reasonable solving for me.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC