Code Duplication    Length = 5-5 lines in 3 locations

Sources/Load.php 1 location

@@ 239-243 (lines=5) @@
236
			$modSettings['default_timezone'] = '';
237
238
		// If date.timezone is unset, invalid, or just plain weird, make a best guess
239
		if (!in_array($modSettings['default_timezone'], timezone_identifiers_list()))
240
		{
241
			$server_offset = @mktime(0, 0, 0, 1, 1, 1970);
242
			$modSettings['default_timezone'] = timezone_name_from_abbr('', $server_offset, 0);
243
		}
244
245
		date_default_timezone_set($modSettings['default_timezone']);
246
	}

other/install.php 2 locations

@@ 246-250 (lines=5) @@
243
			$timezone_id = '';
244
245
		// If date.timezone is unset, invalid, or just plain weird, make a best guess
246
		if (!in_array($timezone_id, timezone_identifiers_list()))
247
		{
248
			$server_offset = @mktime(0, 0, 0, 1, 1, 1970);
249
			$timezone_id = timezone_name_from_abbr('', $server_offset, 0);
250
		}
251
252
		date_default_timezone_set($timezone_id);
253
	}
@@ 1292-1296 (lines=5) @@
1289
			$timezone_id = '';
1290
1291
		// If date.timezone is unset, invalid, or just plain weird, make a best guess
1292
		if (!in_array($timezone_id, timezone_identifiers_list()))
1293
		{
1294
			$server_offset = @mktime(0, 0, 0, 1, 1, 1970);
1295
			$timezone_id = timezone_name_from_abbr('', $server_offset, 0);
1296
		}
1297
1298
		if (date_default_timezone_set($timezone_id))
1299
			$newSettings[] = array('default_timezone', $timezone_id);