Fix QSO with time_on < time_off and QSO with date_off field
这个提交包含在:
		
							父节点
							
								
									ceab35a0c5
								
							
						
					
					
						当前提交
						dc9592da71
					
				
					共有  1 个文件被更改,包括 12 次插入 和 2 次删除
				
			
		| 
						 | 
				
			
			@ -1645,9 +1645,19 @@ class Logbook_model extends CI_Model {
 | 
			
		|||
        $time_on = date('Y-m-d', strtotime($record['qso_date'])) ." ".date('H:i:s', strtotime($record['time_on']));
 | 
			
		||||
 | 
			
		||||
        if (isset($record['time_off'])) {
 | 
			
		||||
            $time_off = date('Y-m-d', strtotime($record['qso_date'])) ." ".date('H:i:s', strtotime($record['time_off']));
 | 
			
		||||
            if (isset($record['date_off'])) {
 | 
			
		||||
                // date_off and time_off set
 | 
			
		||||
                $time_off = date('Y-m-d', strtotime($record['date_off'])) . ' ' . date('H:i:s', strtotime($record['time_off']));
 | 
			
		||||
            } elseif (strtotime($record['time_off']) < strtotime($record['time_on'])) {
 | 
			
		||||
                // date_off is not set, QSO ends next day
 | 
			
		||||
                $time_off = date('Y-m-d', strtotime($record['qso_date'] . ' + 1 day')) . ' ' . date('H:i:s', strtotime($record['time_off']));
 | 
			
		||||
            } else {
 | 
			
		||||
                // date_off is not set, QSO ends same day
 | 
			
		||||
                $time_off = date('Y-m-d', strtotime($record['qso_date'])) . ' ' . date('H:i:s', strtotime($record['time_off']));
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
          $time_off = $time_on;
 | 
			
		||||
            // date_off and time_off not set, QSO end == QSO start
 | 
			
		||||
            $time_off = $time_on;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Store Freq
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		正在加载…
	
		在新工单中引用