mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
[hotfix] using UTC for caching timestamps
This commit is contained in:
@@ -21,7 +21,7 @@ class CacheLabel extends React.PureComponent {
|
||||
updateTooltipContent() {
|
||||
const cachedText = this.props.cachedTimestamp ? (
|
||||
<span>
|
||||
Loaded data cached <b>{moment(this.props.cachedTimestamp).fromNow()}</b>
|
||||
Loaded data cached <b>{moment.utc(this.props.cachedTimestamp).fromNow()}</b>
|
||||
</span>) :
|
||||
'Loaded from cache';
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ export function dashboardContainer(dashboard, datasources) {
|
||||
done(slice) {
|
||||
const refresh = slice.getWidgetHeader().find('.refresh');
|
||||
const data = slice.data;
|
||||
const cachedWhen = moment(data.cached_dttm).fromNow();
|
||||
const cachedWhen = moment.utc(data.cached_dttm).fromNow();
|
||||
if (data !== undefined && data.is_cached) {
|
||||
refresh
|
||||
.addClass('danger')
|
||||
|
||||
Reference in New Issue
Block a user