php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28095 incorrect function return value
Submitted: 2004-04-21 17:43 UTC Modified: 2004-04-21 21:22 UTC
From: csta4476 at hotmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: Irrelevant OS: lunux
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: csta4476 at hotmail dot com
New email:
PHP Version: OS:

 

 [2004-04-21 17:43 UTC] csta4476 at hotmail dot com
Description:
------------
i'm not sure if anyone else noticed but, this function sometimes behaves oddly.
here's what i saw:

mktime(0, 0, 0, 02, 9, 2004);

outputs: 1076302800

but,

mktime(0, 0, 0, 02, 09, 2004);

outputs: 1075525200

which is the same as

mktime(0, 0, 0, 02, 0, 2004);

i didn't think the numbers 0 and 09 were the same.

guess i was wrong?!?!?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-21 18:06 UTC] magnus@php.net
00, 01, 02, 03, 04, 05, 06, 07 are octets..
 [2004-04-21 21:22 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Leading zeros make octal numbers. Octal 09 doesn't exists and becomes 0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 21:01:31 2024 UTC