Code Duplication    Length = 2-2 lines in 2 locations

Sources/Subs-Calendar.php 2 locations

@@ 1235-1236 (lines=2) @@
1232
	// Define the timezone for this event, falling back to the default if not provided
1233
	if (!empty($eventOptions['tz']) && in_array($eventOptions['tz'], timezone_identifiers_list(DateTimeZone::ALL_WITH_BC)))
1234
		$tz = $eventOptions['tz'];
1235
	elseif (!empty($_POST['tz']) && in_array($_POST['tz'], timezone_identifiers_list(DateTimeZone::ALL_WITH_BC)))
1236
		$tz = $_POST['tz'];
1237
	else
1238
		$tz = getUserTimezone();
1239
@@ 1529-1530 (lines=2) @@
1526
		$smcFunc['db_free_result']($request);
1527
	}
1528
1529
	if (empty($timezone) || !in_array($timezone, timezone_identifiers_list(DateTimeZone::ALL_WITH_BC)))
1530
		$timezone = isset($modSettings['default_timezone']) ? $modSettings['default_timezone'] : date_default_timezone_get();
1531
1532
	return $timezone;
1533
}