php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36292 A BIG PROBLEM IN mktime FUNCTION !!!!!
Submitted: 2006-02-05 15:36 UTC Modified: 2006-02-05 15:41 UTC
From: hello at cmail dot cz Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.4.2 OS: Windows XP SP2
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: hello at cmail dot cz
New email:
PHP Version: OS:

 

 [2006-02-05 15:36 UTC] hello at cmail dot cz
Description:
------------
Hi! I found a big problem in function mktime. A different days returns same value. Especially FEBRUARY 8th and 9th 2006. It's a very important, because it's a very soon. There is a fatal problem. See the code below. Greetings from Czech republic. Beda

Reproduce code:
---------------
$A1 = mktime(00,00,00,01,31,2006); 
$A2 = mktime(00,00,00,02,07,2006); 

// $A1=1138662000  $A2=1139266800

$A1 = mktime(00,00,00,01,31,2006); 
$A2 = mktime(00,00,00,02,08,2006); 

// both ($A1 and $A2) returns 1138662000

$A1 = mktime(00,00,00,01,31,2006); 
$A2 = mktime(00,00,00,02,09,2006); 

// both ($A1 and $A2) returns 1138662000


Expected result:
----------------
please see the above

Actual result:
--------------
please see the above

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-05 15:41 UTC] tony2001@php.net
You just have discovered octal numbers.
09 != 9
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 08:01:30 2025 UTC