php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12665 mktime() is strange
Submitted: 2001-08-08 18:06 UTC Modified: 2001-08-08 21:11 UTC
From: Oliver dot Siegmar at gmx dot de Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.0.6 OS: Linux & Windows
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: Oliver dot Siegmar at gmx dot de
New email:
PHP Version: OS:

 

 [2001-08-08 18:06 UTC] Oliver dot Siegmar at gmx dot de
Hi all,

<?
	if ((mktime(0,0,0,08,08,2001)) == (mktime (0,0,0,08,09,2001))) echo "Something wrong - I think!";
?>

The result of both - mktime(0,0,0,08,08,2001) and mktime(0,0,0,08,09,2001) - is 975538800.

Whats wrong?


Bye,
Oliver

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-08 18:17 UTC] alindeman@php.net
wierd...

your script says they are the same, but remove the 0's in front
of the 8 and 9 like

mktime (0,0,0,8,8,2001) (instead of mktime(0,0,0,08,08,2001))

it works as planed (not equal)

supposed to happen?? second opinion, please...


 [2001-08-08 18:29 UTC] jeroen@php.net
08 is octal, write 8.

See section on integers

(phpdoc / language / types / integers)
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC