// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import {getConfig} from 'mattermost-redux/selectors/entities/general'; import * as UserAgent from 'utils/user_agent'; export function areTimezonesEnabledAndSupported(state) { if (UserAgent.isInternetExplorer()) { return false; } const config = getConfig(state); return config.ExperimentalTimezone === 'true'; } export function getBasePath(state) { const config = getConfig(state) || {}; return new URL(config.SiteURL || window.location.origin).pathname; }