/** * @inheritDoc */ public function getTimeZoneString() { global $user; // Note that 0 is a valid timezone (GMT) so we use strlen not empty to check. if (variable_get('configurable_timezones', 1) && $user->uid && isset($user->timezone) && strlen($user->timezone)) { $timezone = $user->timezone; } else { $timezone = variable_get('date_default_timezone', NULL); } if (!$timezone) { $timezone = parent::getTimeZoneString(); } return $timezone; }
/** * @inheritDoc */ public function getTimeZoneString() { global $user; // Note that 0 is a valid timezone (GMT) so we use strlen not empty to check. if (config_get('system.date', 'user_configurable_timezones') && $user->uid && isset($user->timezone) && strlen($user->timezone)) { $timezone = $user->timezone; } else { $timezone = config_get('system.date', 'default_timezone'); } if (!$timezone) { $timezone = parent::getTimeZoneString(); } return $timezone; }
/** * @inheritDoc */ public function getTimeZoneString() { global $user; if (variable_get('configurable_timezones', 1) && $user->uid && strlen($user->timezone)) { $timezone = $user->timezone; } else { $timezone = variable_get('date_default_timezone', NULL); } if (!$timezone) { $timezone = parent::getTimeZoneString(); } return $timezone; }