php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1069 using leading zeros in mkdate gives incorrect timestamp
Submitted: 1999-01-14 01:27 UTC Modified: 1999-01-17 02:24 UTC
From: tjones at northstar dot k12 dot ak dot us Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.6 OS: Linux 2.0.36
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: tjones at northstar dot k12 dot ak dot us
New email:
PHP Version: OS:

 

 [1999-01-14 01:27 UTC] tjones at northstar dot k12 dot ak dot us
Big OOPS, should be mktime not mkdate!


./configure --with-apache=../apache_1.3.3 --with-mysql --with-ldap --with-imap -
-with-zlib --enable-sysvshm=yes --enable-sysvsem=yes --with-config-file-path

default php.ini file

<?
$futureDay = mktime(0,0,0,4,8,1999);
$futureDay1 = mktime(0,0,0,4,08,1999);

<LI>(<? echo date("l F dt\h Y", $futureDay); ?>,<? echo $futureDay ?>)
<LI>(<? echo date("l F dt\h Y", $futureDay1); ?> <? echo $futureDay1; ?>)
?>

result is
(Thursday April 08th 1999,923558400)
(Wednesday March 31th 1999 922870800)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-01-17 02:24 UTC] rasmus
Numbers beginning with 0 are in octal, so 08 isn't
even a valid number.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 14:01:36 2025 UTC