php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31556 mktime()-bug
Submitted: 2005-01-14 17:58 UTC Modified: 2005-01-14 18:40 UTC
From: stephan at fischers-welt dot de Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.8 OS: Win2003 Server
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: stephan at fischers-welt dot de
New email:
PHP Version: OS:

 

 [2005-01-14 17:58 UTC] stephan at fischers-welt dot de
Description:
------------
Hi!

I found a bug in mktime():

try to give out the UNIX-Seconds for Jan 08 2005 at 16:45:27 with the mktime()-command! No chance to do that.
What's the problem?

Reproduce code:
---------------
<?php
echo mktime(16,45,27,01,08,2005) . "<br>";
echo date("d.m.Y - H:i:s",mktime(16,45,27,01,08,2005));
?>

Expected result:
----------------
1105199127
08.01.2005 - 16:45:27

Actual result:
--------------
1104507927
31.12.2004 - 16:45:27

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-14 18:39 UTC] sniper@php.net
01 -> 1 and it works. (01 is octal number..)

User error -> bogus.

 [2005-01-14 18:40 UTC] sniper@php.net
Change 08 to 8 too..


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 00:00:03 2025 UTC