| @@ 265-269 (lines=5) @@ | ||
| 262 | $timezone_id = ''; |
|
| 263 | ||
| 264 | // If date.timezone is unset, invalid, or just plain weird, make a best guess |
|
| 265 | if (!in_array($timezone_id, timezone_identifiers_list())) |
|
| 266 | { |
|
| 267 | $server_offset = @mktime(0, 0, 0, 1, 1, 1970); |
|
| 268 | $timezone_id = timezone_name_from_abbr('', $server_offset, 0); |
|
| 269 | } |
|
| 270 | ||
| 271 | date_default_timezone_set($timezone_id); |
|
| 272 | } |
|
| @@ 1272-1276 (lines=5) @@ | ||
| 1269 | $timezone_id = ''; |
|
| 1270 | ||
| 1271 | // If date.timezone is unset, invalid, or just plain weird, make a best guess |
|
| 1272 | if (!in_array($timezone_id, timezone_identifiers_list())) |
|
| 1273 | { |
|
| 1274 | $server_offset = @mktime(0, 0, 0, 1, 1, 1970); |
|
| 1275 | $timezone_id = timezone_name_from_abbr('', $server_offset, 0); |
|
| 1276 | } |
|
| 1277 | ||
| 1278 | if (date_default_timezone_set($timezone_id)) |
|
| 1279 | $newSettings[] = array('default_timezone', $timezone_id); |
|
| @@ 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 | } |
|