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
 [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 22:01:30 2024 UTC