Code Duplication    Length = 7-7 lines in 2 locations

calendar/inc/class.calendar_boupdate.inc.php 2 locations

@@ 1291-1297 (lines=7) @@
1288
				$event['start'] = egw_time::to($time, 'ts');
1289
				$save_event['start'] = $time;
1290
			}
1291
			if (!empty($event['end']))
1292
			{
1293
				$time = new egw_time($event['end'], egw_time::$user_timezone);
1294
				$time->setTime(23, 59, 59);
1295
				$event['end'] = egw_time::to($time, 'ts');
1296
				$save_event['end'] = $time;
1297
			}
1298
			if (!empty($event['recurrence']))
1299
			{
1300
				$time = $this->so->startOfDay(new egw_time($event['recurrence'], egw_time::$user_timezone));
@@ 1303-1309 (lines=7) @@
1300
				$time = $this->so->startOfDay(new egw_time($event['recurrence'], egw_time::$user_timezone));
1301
				$event['recurrence'] = egw_time::to($time, 'ts');
1302
			}
1303
			if (!empty($event['recur_enddate']))
1304
			{
1305
				$time = $this->so->startOfDay(new egw_time($event['recur_enddate'], egw_time::$user_timezone));
1306
				$event['recur_enddate'] = egw_time::to($time, 'ts');
1307
				$time->setUser();
1308
				$save_event['recur_enddate'] = egw_time::to($time, 'ts');
1309
			}
1310
			$timestamps = array('modified','created');
1311
			// all-day events are handled in server time
1312
			$event['tzid'] = $save_event['tzid'] = egw_time::$server_timezone->getName();