Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/load.php on line 926

Notice: Trying to access array offset on value of type bool in /var/www/html/ticnews.com.br/web/wp-includes/theme.php on line 2360

Notice: Trying to access array offset on value of type bool in /var/www/html/ticnews.com.br/web/wp-content/plugins/download-monitor/src/DLM.php on line 236

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
EVENTOS – TICNEWS
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768

EVENTOS

, 'Tokyo Standard Time' => 'Asia/Tokyo', 'Tonga' => 'Pacific/Tongatapu', 'Tonga Standard Time' => 'Pacific/Tongatapu', 'Truk' => 'Pacific/Truk', 'Turkey' => 'Europe/Istanbul', 'Turkmenistan' => 'Asia/Ashgabat', 'Tuvalu' => 'Pacific/Funafuti', 'US/Eastern' => 'America/New_York', 'US Eastern Standard Time' => 'Etc/GMT+5', 'US Mountain Standard Time' => 'America/Phoenix', 'Uralsk' => 'Asia/Oral', 'Uruguay' => 'America/Montevideo', 'Urumqi' => 'Asia/Urumqi', 'Uzbekistan' => 'Asia/Tashkent', 'Vanuatu' => 'Pacific/Efate', 'Venezuela' => 'America/Caracas', 'Venezuela Standard Time' => 'America/Caracas', 'Vladivostok' => 'Asia/Vladivostok', 'Vladivostok Standard Time' => 'Asia/Vladivostok', 'Volgograd' => 'Europe/Volgograd', 'Vostok' => 'Antarctica/Vostok', 'W. Australia Standard Time' => 'Australia/Perth', 'W. Central Africa Standard Time' => 'Africa/Lagos', 'W. Europe Standard Time' => 'Europe/Berlin', 'Wake' => 'Pacific/Wake', 'Wallis' => 'Pacific/Wallis', 'West Asia Standard Time' => 'Asia/Tashkent', 'West Pacific Standard Time' => 'Pacific/Port_Moresby', 'Yakutsk' => 'Asia/Yakutsk', 'Yakutsk Standard Time' => 'Asia/Yakutsk', 'Yekaterinburg' => 'Asia/Yekaterinburg', 'Yerevan' => 'Asia/Yerevan', 'Yukon' => 'America/Yakutat', ); /** * @var array Map of timezones acceptable by DateTimeZone but not strtotime. */ protected $_invalid_legacy = array( 'US/Eastern' => true, ); /** * @var array|bool List of system identifiers or false if none available. */ protected $_identifiers = false; /** * Initialize local cache and identifiers. * * @param Ai1ec_Registry_Object $registry Registry to use. * * @return void */ public function __construct( Ai1ec_Registry_Object $registry ) { parent::__construct( $registry ); $this->_cache = $this->_registry->get( 'cache.memory' ); $this->_init_identifiers(); } /** * Get default timezone to use in input/output. * * Approach is as follows: * - check user profile for timezone preference; * - if user has no preference - check site for timezone selection; * - if site has no selection - raise notice and use 'UTC'. * * @return string Olson timezone string identifier. */ public function get_default_timezone() { static $default_timezone = null; if ( null === $default_timezone ) { $candidates = array(); $candidates[] = (string)$this->_registry->get( 'model.meta-user' ) ->get_current( 'ai1ec_timezone' ); $candidates[] = (string)$this->_registry->get( 'model.option' ) ->get( 'timezone_string' ); $candidates[] = (string)$this->_registry->get( 'model.option' ) ->get( 'gmt_offset' ); $candidates = array_filter( $candidates, 'strlen' ); foreach ( $candidates as $timezone ) { $timezone = $this->get_name( $timezone ); if ( false !== $timezone ) { $default_timezone = $timezone; break; } } if ( null === $default_timezone ) { $default_timezone = 'UTC'; $this->_registry->get( 'notification.admin' )->store( sprintf( Ai1ec_I18n::__( 'Please select site timezone in %s Timezone dropdown menu.' ), '' . Ai1ec_I18n::__( 'Settings' ) . '' ), 'error' ); } } return $default_timezone; } /** * Attempt to decode GMT offset to some Olson timezone. * * @param float $zone GMT offset. * * @return string Valid Olson timezone name (UTC is last resort). */ public function decode_gmt_timezone( $zone ) { $auto_zone = timezone_name_from_abbr( null, $zone * 3600, true ); if ( false !== $auto_zone ) { return $auto_zone; } $auto_zone = timezone_name_from_abbr( null, ( (int) $zone ) * 3600, true ); if ( false !== $auto_zone ) { return $auto_zone; } $this->_registry->get( 'notification.admin' )->store( sprintf( Ai1ec_I18n::__( 'Timezone "UTC%+d" is not recognized. Please %suse valid%s timezone name, until then events will be created in UTC timezone.' ), $zone, '', '' ), 'error' ); return 'UTC'; } /** * Get valid timezone name from input. * * @param string $zone Name to check/parse. * * @return string Timezone name to use */ public function get_name( $zone ) { if ( is_numeric( $zone ) ) { $decoded_zone = $this->decode_gmt_timezone( $zone ); if ( 'UTC' !== $decoded_zone ) { $message = sprintf( Ai1ec_I18n::__( 'Selected timezone "UTC%+d" will be treated as %s.' ), $zone, $decoded_zone ); $this->_registry->get( 'notification.admin' ) ->store( $message ); } $zone = $decoded_zone; } if ( false === $this->_identifiers ) { return $zone; // anything should do, as zones are not supported } if ( ! isset( $this->_identifiers[$zone] ) ) { $zone = $this->_olson_lookup( $zone ); $valid_legacy = false; try { new DateTimeZone( $zone ); // throw away instantly $valid_legacy = true; } catch ( Exception $excpt ) { $valid_legacy = false; } if ( ! $valid_legacy || isset( $this->_invalid_legacy[$zone] ) ) { return $this->guess_zone( $zone ); } $this->_identifiers[$zone] = $zone; unset( $valid_legacy ); } return $zone; } /** * Quick map look-up to discard zones that have limited recognition. * * @param string $zone Name of timezone to lookup. * * @return string Timezone name to use. Might be the same as $zone. */ protected function _olson_lookup( $zone ) { if ( isset( $this->_zones[$zone] ) ) { return $this->_zones[$zone]; } return $zone; } /** * Check if timezone is set in wp_option * */ public function is_timezone_not_set() { $timezone = $this->_registry->get( 'model.option' ) ->get( 'timezone_string' ); return empty( $timezone ); } /** * Render options for select in settings * * @return array */ public function get_timezones( $only_zones = false ) { $zones = DateTimeZone::listIdentifiers(); if ( empty( $zones ) ) { return array(); } if ( ! $only_zones ) { $manual = __( 'Manual Offset', AI1EC_PLUGIN_NAME ); $options = array(); $options[$manual][] = array( 'text' => __( 'Choose your timezone', AI1EC_PLUGIN_NAME ), 'value' => '', 'args' => array( 'selected' => 'selected' ) ); } foreach ( $zones as $zone ) { $exploded_zone = explode( '/', $zone ); if ( ! isset( $exploded_zone[1] ) && ! $only_zones ) { $exploded_zone[1] = $exploded_zone[0]; $exploded_zone[0] = $manual; } $optgroup = $exploded_zone[0]; unset( $exploded_zone[0] ); $options[$optgroup][] = array( 'text' => implode( '/', $exploded_zone ), 'value' => $zone, ); } return $options; } /** * Guess valid timezone identifier from arbitrary input. * * @param string $meta_name Arbitrary input. * * @return string|bool Parsed timezone name or false if none found. */ public function guess_zone( $meta_name ) { if ( isset( $this->_zones[$meta_name] ) ) { return $this->_zones[$meta_name]; } $name_variants = array( strtr( $meta_name, ' ', '_' ), strtr( $meta_name, '_', ' ' ), ); if ( false !== ( $parenthesis_pos = strpos( $meta_name, '(' ) ) ) { foreach ( $name_variants as $name ) { $name_variants[] = substr( $name, 0, $parenthesis_pos - 1 ); } } foreach ( $name_variants as $name ) { if ( isset( $this->_zones[$name] ) ) { // cache to avoid future lookups and return $this->_zones[$meta_name] = $this->_zones[$name]; return $this->_zones[$name]; } } if ( isset( $meta_name{0} ) && '(' === $meta_name{0} && $closing_pos = strpos( $meta_name, ')' ) ) { $meta_name = trim( substr( $meta_name, $closing_pos + 1 ) ); return $this->guess_zone( $meta_name ); } if ( false === strpos( $meta_name, ' Standard ' ) && false !== ( $time_pos = strpos( $meta_name, ' Time' ) ) ) { $meta_name = substr( $meta_name, 0, $time_pos ) . ' Standard' . substr( $meta_name, $time_pos ); return $this->guess_zone( $meta_name ); } return false; } /** * Get timezone object instance. * * @param string $timezone Name of timezone to get instance for. * * @return DateTimeZone Instance of timezone object. * * @throws Ai1ec_Date_Timezone_Exception If an error occurs. */ public function get( $timezone ) { if ( 'sys.default' === $timezone ) { $timezone = $this->get_default_timezone(); } $name = $this->get_name( $timezone ); if ( ! $name ) { $name = $this->get_name( $this->get_default_timezone() ); } $zone = $this->_cache->get( $name, null ); if ( null === $zone ) { $exception = null; try { $zone = new DateTimeZone( $name ); } catch ( Exception $invalid_tz ) { $exception = $invalid_tz; } if ( null !== $exception ) { throw new Ai1ec_Date_Timezone_Exception( $exception->getMessage() ); } $this->_cache->set( $name, $zone ); } return $zone; } /** * Add system identifiers to object registry. * * @return bool Success */ protected function _init_identifiers() { $identifiers = DateTimeZone::listIdentifiers(); if ( ! $identifiers ) { return false; } $mapped = array(); foreach ( $identifiers as $zone ) { $zone = (string)$zone; $mapped[$zone] = true; $this->_zones[$zone] = $zone; } unset( $identifiers, $zone ); $this->_identifiers = $mapped; return true; } }