#38994 [NEW]: bugs in mktime() - easy to confirm
| From: | naox at yum dot pl | Date: | Fri, 29 Sep 2006 15:12:26 +0000 |
| Subject: | #38994 [NEW]: bugs in mktime() - easy to confirm | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-102895@lists.php.net to get a copy of this message | ||
From: naox at yum dot pl
Operating system: centos 4
PHP version: 5.1.6
PHP Bug Type: Scripting Engine problem
Bug description: bugs in mktime() - easy to confirm
Description:
------------
there is problem with mktime. it caclulates badly seconds in pedroids
27-28 march in some years like 2005. Possibly some other pedroids are
affected. this is just example to make bug search easier.
Reproduce code:
---------------
<?
$a1 = mktime(0,0,0,3,27,2005);
$a2 = mktime(0,0,0,3,28,2005);
$w = ($a2 - $a1) / 60 / 60 / 24;
echo $w;
echo "<br>\n";
$a1 = mktime(0,0,0,3,27,2006);
$a2 = mktime(0,0,0,3,28,2006);
$w = ($a2 - $a1) / 60 / 60 / 24;
echo $w;
?>
Expected result:
----------------
1
1
Actual result:
--------------
will show:
0.95833333333333
1
--
Edit bug report at http://bugs.php.net/?id=38994&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38994&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38994&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38994&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38994&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38994&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38994&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38994&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38994&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38994&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38994&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38994&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38994&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38994&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38994&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38994&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38994&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38994&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38994&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38994&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38994&r=mysqlcfg