phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.datetime.inc.php,1.5.2.12,1.


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.datetime.inc.php,1.5.2.12,1.5.2.13
Date: Fri, 18 Apr 2003 04:20:44 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv1075

Modified Files:
      Tag: Version-0_9_14-branch
        class.datetime.inc.php 
Log Message:
fix for bug reported on user-list, time-compare creates date before 1970/1/1 
which is the earliest allowed date on windows


Index: class.datetime.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.datetime.inc.php,v
retrieving revision 1.5.2.12
retrieving revision 1.5.2.13
diff -C2 -r1.5.2.12 -r1.5.2.13
*** class.datetime.inc.php      18 Mar 2003 17:52:26 -0000      1.5.2.12
--- class.datetime.inc.php      18 Apr 2003 08:20:42 -0000      1.5.2.13
***************
*** 391,396 ****
                function 
time_compare($a_hour,$a_minute,$a_second,$b_hour,$b_minute,$b_second)
                {
!                       $a_time = 
mktime(intval($a_hour),intval($a_minute),intval($a_second),0,0,70);
!                       $b_time = 
mktime(intval($b_hour),intval($b_minute),intval($b_second),0,0,70);
                        if($a_time == $b_time)
                        {
--- 391,398 ----
                function 
time_compare($a_hour,$a_minute,$a_second,$b_hour,$b_minute,$b_second)
                {
!                       // I use the 1970/1/2 to compare the times, as the 1. 
can get via TZ-offest still 
!                       // before 1970/1/1, which is the earliest date allowed 
on windows
!                       $a_time = 
mktime(intval($a_hour),intval($a_minute),intval($a_second),1,2,1970);
!                       $b_time = 
mktime(intval($b_hour),intval($b_minute),intval($b_second),1,2,1970);
                        if($a_time == $b_time)
                        {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]