Code Duplication    Length = 2-2 lines in 2 locations

Sources/Subs-Calendar.php 2 locations

@@ 1337-1338 (lines=2) @@
1334
	// Define the timezone for this event, falling back to the default if not provided
1335
	if (!empty($eventOptions['tz']) && in_array($eventOptions['tz'], timezone_identifiers_list(DateTimeZone::ALL_WITH_BC)))
1336
		$tz = $eventOptions['tz'];
1337
	elseif (!empty($_POST['tz']) && in_array($_POST['tz'], timezone_identifiers_list(DateTimeZone::ALL_WITH_BC)))
1338
		$tz = $_POST['tz'];
1339
	else
1340
		$tz = getUserTimezone();
1341
@@ 1631-1632 (lines=2) @@
1628
		$smcFunc['db_free_result']($request);
1629
	}
1630
1631
	if (empty($timezone) || !in_array($timezone, timezone_identifiers_list(DateTimeZone::ALL_WITH_BC)))
1632
		$timezone = isset($modSettings['default_timezone']) ? $modSettings['default_timezone'] : date_default_timezone_get();
1633
1634
	return $timezone;
1635
}