| @@ 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 | } |
|
| @@ 253-257 (lines=5) @@ | ||
| 250 | $timezone_id = ''; |
|
| 251 | ||
| 252 | // If date.timezone is unset, invalid, or just plain weird, make a best guess |
|
| 253 | if (!in_array($timezone_id, timezone_identifiers_list())) |
|
| 254 | { |
|
| 255 | $server_offset = @mktime(0, 0, 0, 1, 1, 1970); |
|
| 256 | $timezone_id = timezone_name_from_abbr('', $server_offset, 0); |
|
| 257 | } |
|
| 258 | ||
| 259 | date_default_timezone_set($timezone_id); |
|
| 260 | } |
|
| @@ 1349-1353 (lines=5) @@ | ||
| 1346 | $timezone_id = ''; |
|
| 1347 | ||
| 1348 | // If date.timezone is unset, invalid, or just plain weird, make a best guess |
|
| 1349 | if (!in_array($timezone_id, timezone_identifiers_list())) |
|
| 1350 | { |
|
| 1351 | $server_offset = @mktime(0, 0, 0, 1, 1, 1970); |
|
| 1352 | $timezone_id = timezone_name_from_abbr('', $server_offset, 0); |
|
| 1353 | } |
|
| 1354 | ||
| 1355 | if (date_default_timezone_set($timezone_id)) |
|
| 1356 | $newSettings[] = array('default_timezone', $timezone_id); |
|