|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-09-06 15:42 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 09:00:02 2025 UTC |
Description: ------------ Hi, I am making a counting system, which will told visitor to a days difference within selected date range. If user enter date till 2038 it works fine..and user enter beyond then this, then it start giving error (negative values) I read that due to PHP version problem it did, but we have "PHP Version 5.2.5" installed on the server. Can you please suggest about this error. Reproduce code: --------------- For your reference, i am using following code: $dateDiff = mktime( $from['hour'] , $from['minutes'] , $from['seconds'] , $from['month'] , $from['day'] , $from['year'] ) - mktime( $to['hour'] , $to['minutes'] , $to['seconds'] , $to['month'] , $to['day'] , $to['year'] ); $intDays = floor( $dateDiff / (60*60*24) ); $intHours = floor( ($dateDiff - ($intDays*60*60*24) ) / (60*60) ); $intMinutes = floor( ($dateDiff - ($intDays*60*60*24) - ($intHours*60*60) ) /60 );