| @@ 236-240 (lines=5) @@ | ||
| 233 | $modSettings['default_timezone'] = ''; |
|
| 234 | ||
| 235 | // If date.timezone is unset, invalid, or just plain weird, make a best guess |
|
| 236 | if (!in_array($modSettings['default_timezone'], timezone_identifiers_list())) |
|
| 237 | { |
|
| 238 | $server_offset = @mktime(0, 0, 0, 1, 1, 1970); |
|
| 239 | $modSettings['default_timezone'] = timezone_name_from_abbr('', $server_offset, 0); |
|
| 240 | } |
|
| 241 | ||
| 242 | date_default_timezone_set($modSettings['default_timezone']); |
|
| 243 | } |
|
| @@ 244-248 (lines=5) @@ | ||
| 241 | $timezone_id = ''; |
|
| 242 | ||
| 243 | // If date.timezone is unset, invalid, or just plain weird, make a best guess |
|
| 244 | if (!in_array($timezone_id, timezone_identifiers_list())) |
|
| 245 | { |
|
| 246 | $server_offset = @mktime(0, 0, 0, 1, 1, 1970); |
|
| 247 | $timezone_id = timezone_name_from_abbr('', $server_offset, 0); |
|
| 248 | } |
|
| 249 | ||
| 250 | date_default_timezone_set($timezone_id); |
|
| 251 | } |
|
| @@ 1254-1258 (lines=5) @@ | ||
| 1251 | $timezone_id = ''; |
|
| 1252 | ||
| 1253 | // If date.timezone is unset, invalid, or just plain weird, make a best guess |
|
| 1254 | if (!in_array($timezone_id, timezone_identifiers_list())) |
|
| 1255 | { |
|
| 1256 | $server_offset = @mktime(0, 0, 0, 1, 1, 1970); |
|
| 1257 | $timezone_id = timezone_name_from_abbr('', $server_offset, 0); |
|
| 1258 | } |
|
| 1259 | ||
| 1260 | if (date_default_timezone_set($timezone_id)) |
|
| 1261 | $newSettings[] = array('default_timezone', $timezone_id); |
|