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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 20:01:30 2024 UTC