php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64207 unix time() compare with integer
Submitted: 2013-02-14 02:48 UTC Modified: 2015-06-28 04:22 UTC
From: mabelair at sympatico dot ca Assigned:
Status: No Feedback Package: Date/time related
PHP Version: Irrelevant OS: OSX 10.7.5 / win XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mabelair at sympatico dot ca
New email:
PHP Version: OS:

 

 [2013-02-14 02:48 UTC] mabelair at sympatico dot ca
Description:
------------
$sd = mktime(12,0,0,$mois, $jour, $annee);

	    	if ($sd < 1360731600) {
	     		include("agenda_paiement_vieux.php");
	    	}
	     	else {
	     		include("agenda_paiement_nouv.php");
	     	}
6 février 2013 (unix time) fonctionne si $sd = 1360170000   ALL ok !

7 février 2013 (unix time) ne fonctionne pas si $sd = 1360256400 do not work

11 février 2013 (unix time) fonctionne si $sd = 1360731600 ALL ok!

It seems to be an hole is the serie ??

 machine is  32 bit   running  OSX 10.7.5 Lion   and same problem with
 machine is  32 bit   running  Win/XP 

Thank you and goodnite.

Michel

Test script:
---------------
$sd = mktime(12,0,0,$mois, $jour, $annee);

	    	if ($sd < 1360731600) {
	     		include("agenda_paiement_vieux.php");
	    	}
	     	else {
	     		include("agenda_paiement_nouv.php");
	     	}


Expected result:
----------------
Expecting:

TRUE  going to sub-routine agenda_paiement_vieux.php when $sd=1360256400



Actual result:
--------------
False going to sub-routine agenda_paiement_nouv.php when $sd=1360256400

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-17 18:24 UTC] cmb@php.net
-Status: Open +Status: Feedback
 [2015-06-17 18:24 UTC] cmb@php.net
I can't reproduce this issue, see <http://3v4l.org/cCY3N>. It's
unlikely that the 32bit architecture is causing a problem, because
1360256400 < 2**31.

Please double check that mktime() actually returns the assumed
value.
 [2015-06-28 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 27 03:03:34 2021 UTC