1.1 --- a/system/classes/timezoneconfig.class.php Sun Sep 20 11:14:25 2009 +0200
1.2 +++ b/system/classes/timezoneconfig.class.php Sun Sep 20 13:37:16 2009 +0200
1.3 @@ -86,10 +86,17 @@
1.4 {
1.5 global $_CONF, $_USER;
1.6
1.7 + // handle like the theme cookie, i.e. use if user is not logged in
1.8 + if (isset($_COOKIE[$_CONF['cookie_tzid']]) && empty($_USER['tzid'])) {
1.9 + $_USER['tzid'] = $_COOKIE[$_CONF['cookie_tzid']];
1.10 + }
1.11 +
1.12 if (! empty($_USER['tzid'])) {
1.13 $timezone = $_USER['tzid'];
1.14 } elseif (! empty($_CONF['timezone'])) {
1.15 $timezone = $_CONF['timezone'];
1.16 + } elseif (function_exists('date_default_timezone_get')) {
1.17 + $timezone = @date_default_timezone_get();
1.18 } else {
1.19 require_once 'Date/TimeZone.php';
1.20