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
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: 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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 07 07:01:30 2024 UTC