ID:               22163
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Analyzed
 Bug Type:         Date/time related
 Operating System: MacOS X 10.2
 PHP Version:      4.3.0
 New Comment:

OK! That actually seems reasonable.  In Europe at least, the DST
time-change is defined to take place at 01:00:00, so the hour from
01:00:00 to 01:59:59 does not exist on that date.

So it look like the bug is that the times for the hour between 00:00:00
and 00:59:59 are wrong on a date when the clock goes back for DST.

Now that we have this pinned down, I'm going to kick this to a
developer who knows about the relevant bits of the PHP source to say
whether this is something PHP can address, or whether it's a bug in the
date/time handling of MacOS X that you'll just have to live with.


Previous Comments:
------------------------------------------------------------------------

[2003-02-12 08:37:47] [EMAIL PROTECTED]

The first result I get is when mktime() is set to:
$the_day=mktime(2,0,0,3,30,2003);

and the result is:
1048989600

instead of -1

------------------------------------------------------------------------

[2003-02-12 08:03:47] [EMAIL PROTECTED]

Maybe -- or maybe my arithmetic is off!

Could you possibly do a bit more testing and report the first time
after 01:01:03 that you get a likely result (and what it is!)?

------------------------------------------------------------------------

[2003-02-12 07:43:00] [EMAIL PROTECTED]

really screwy then :-)

With the script:
<?PHP

$the_day=mktime(0,0,0,3,30,2003);
echo "$the_day<br>";
echo "23:59:59 29-Mar = ", mktime(23, 59, 59, 3, 29, 2003),    ";
01:01:03 30-Mar = ", mktime(1, 1, 3, 3, 30, 2003);

?>

I get the result:
-3662
23:59:59 29-Mar = 1048982399; 01:01:03 30-Mar = -1

------------------------------------------------------------------------

[2003-02-12 07:28:21] [EMAIL PROTECTED]

H'mmm -- I get

23:59:59 29-Mar = 1048982399; 01:00:01 30-Mar = 1048982401

on my system, which is what I expected from your report.  There seems
to be an extra minute or so of limbo on yours for some reason.  Can you
try again with:

   mktime(1, 1, 3, 3, 30, 2003)

and let us know the result.  If it's about 1048982463, then it seems
there's a whole minute in there for which you don't seem to be able to
get a valid time.  If it's anything else, then something is really
screwy.  Either way, it seems to be a real bug.


------------------------------------------------------------------------

[2003-02-12 05:53:05] [EMAIL PROTECTED]

ok, I used the script:
<?PHP

$the_day=mktime(0,0,0,3,30,2003);
echo "$the_day<br>";
echo "23:59:59 29-Mar = ", mktime(23, 59, 59, 3, 29, 2003),    ";
01:00:01 30-Mar = ", mktime(1, 0, 1, 3, 30, 2003);

?>

and got:

-3662
23:59:59 29-Mar = 1048982399; 01:00:01 30-Mar = -61

I thought it might be a daylight savings time problem as well, hence I
thought the extra parameter I normally use would solve the problem, but
it didn't. i.e.
$the_day=mktime(0,0,0,3,30,2003,0);

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/22163

-- 
Edit this bug report at http://bugs.php.net/?id=22163&edit=1

Reply via email to