[Vtigercrm-commits] [vtiger-commits] r6271 - /vtigercrm/trunk/modules/Calendar/CalendarCommon.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sun May 21 07:45:16 EDT 2006


Author: saraj
Date: Sun May 21 05:45:12 2006
New Revision: 6271

Log:
changes made to fix the error in the code

Modified:
    vtigercrm/trunk/modules/Calendar/CalendarCommon.php

Modified: vtigercrm/trunk/modules/Calendar/CalendarCommon.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/CalendarCommon.php (original)
+++ vtigercrm/trunk/modules/Calendar/CalendarCommon.php Sun May 21 05:45:12 2006
@@ -241,23 +241,29 @@
 		}
 		else
 		{
-			$sthr = $sthr - 12;
+			if($hr == 12)
+				$sthr = $hr;
+			else
+				$sthr = $hr - 12;
 			if($sthr <= 9 && strlen(trim($sthr)) < 2)
                         {
                                 $hrvalue= '0'.$sthr;
-                        }else $hrvalue=$edhr;
+                        }else $hrvalue=$sthr;
 			$timearr['starthour'] = $hrvalue;
 			$timearr['startfmt'] = 'pm';
 		}
 		$ehr = $edhr+0;
-                if($hr <= 11)
+                if($ehr <= 11)
                 {
                         $timearr['endhour'] = $edhr;
                         $timearr['endfmt'] = 'am';
                 }
                 else
                 {
-                        $edhr = $edhr - 12;
+			if($edhr == 12)
+				$edhr =	$edhr;
+			else
+				$edhr = $edhr - 12;
                         if($edhr <= 9 && strlen(trim($edhr)) < 2)
                         {
                                 $hrvalue= '0'.$edhr;





More information about the vtigercrm-commits mailing list