diff --git a/superset/assets/src/explore/components/controls/DateFilterControl.jsx b/superset/assets/src/explore/components/controls/DateFilterControl.jsx index 4d210c433c2f6..9e07b99037cac 100644 --- a/superset/assets/src/explore/components/controls/DateFilterControl.jsx +++ b/superset/assets/src/explore/components/controls/DateFilterControl.jsx @@ -66,15 +66,8 @@ const COMMON_TIME_FRAMES = [ const TIME_GRAIN_OPTIONS = ['seconds', 'minutes', 'hours', 'days', 'weeks', 'months', 'years']; const MOMENT_FORMAT = 'YYYY-MM-DD[T]HH:mm:ss'; -const DEFAULT_SINCE = moment() - .utc() - .startOf('day') - .subtract(7, 'days') - .format(MOMENT_FORMAT); -const DEFAULT_UNTIL = moment() - .utc() - .startOf('day') - .format(MOMENT_FORMAT); +const DEFAULT_SINCE = moment().startOf('day').subtract(7, 'days').format(MOMENT_FORMAT); +const DEFAULT_UNTIL = moment().startOf('day').format(MOMENT_FORMAT); const SEPARATOR = ' : '; const FREEFORM_TOOLTIP = t( 'Superset supports smart date parsing. Strings like `last sunday` or ' + @@ -116,12 +109,8 @@ function getStateFromCommonTimeFrame(value) { tab: TABS.DEFAULTS, type: TYPES.DEFAULTS, common: value, - since: moment() - .utc() - .startOf('day') - .subtract(1, units) - .format(MOMENT_FORMAT), - until: moment().utc().startOf('day').format(MOMENT_FORMAT), + since: moment().startOf('day').subtract(1, units).format(MOMENT_FORMAT), + until: moment().startOf('day').format(MOMENT_FORMAT), }; } @@ -130,15 +119,13 @@ function getStateFromCustomRange(value) { let since; let until; if (rel === RELATIVE_TIME_OPTIONS.LAST) { - until = moment().utc().startOf('day').format(MOMENT_FORMAT); + until = moment().startOf('day').format(MOMENT_FORMAT); since = moment() - .utc() .startOf('day') .subtract(num, grain) .format(MOMENT_FORMAT); } else { until = moment() - .utc() .startOf('day') .add(num, grain) .format(MOMENT_FORMAT); diff --git a/superset/assets/src/explore/controls.jsx b/superset/assets/src/explore/controls.jsx index 40e1233c78024..19773bb411c6a 100644 --- a/superset/assets/src/explore/controls.jsx +++ b/superset/assets/src/explore/controls.jsx @@ -1026,14 +1026,6 @@ export const controls = { freeForm: true, label: t('Time range'), default: t('No filter'), - description: t( - 'The time range for the visualization. All relative times, e.g. "Last month", ' + - '"Last 7 days", "now", etc. are evaluated on the server using the server\'s ' + - 'local time (sans timezone). All tooltips and placeholder times are expressed ' + - 'in UTC (sans timezone). The timestamps are then evaluated by the database ' + - 'using the engine\'s local timezone. Note one can explicitly set the timezone ' + - 'per the ISO 8601 format if specifying either the start and/or end time.', - ), }, max_bubble_size: {