|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-02-17 16:29 UTC] derick@php.net
-Status: Open
+Status: Bogus
[2011-02-17 16:29 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 09 08:00:01 2025 UTC |
Description: ------------ Hi, Mktime returns bad value when we worl on marchs date. The diffrence bettween dates is wrong. Test script: --------------- <? $du ="26/03/2011"; $au ="28/03/2011"; $duArr = explode("/", $du); $auArr = explode("/", $au); $hour = 0;//date("H"); $minute = 0;//date("i"); $second = 0;//date("s"); $date1 = mktime($hour,$minute,$second,intval($duArr[1]),intval($duArr[0]),intval($duArr[2])); $date2 = mktime($hour,$minute,$second,intval($auArr[1]),intval($auArr[0]),intval($auArr[2])); $diffDate = $date2 - $date1; $diffJours = floor($diffDate/(60*60*24)); echo $diffJours."<br>"; ?> Expected result: ---------------- Must return 2 Actual result: -------------- Returning 1