Commit 1499c2bf by Alexander Zobnin Committed by Torkel Ödegaard

Fix User/Org default timezone bug (#8748)

* dashboard: don't override timezone if default selected, issue #8503

* dashboard: hide UTC icon immediately after timezone changing
parent b8aa2037
......@@ -247,9 +247,9 @@ export class DashboardModel {
formatDate(date, format?) {
date = moment.isMoment(date) ? date : moment(date);
format = format || 'YYYY-MM-DD HH:mm:ss';
this.timezone = this.getTimezone();
let timezone = this.getTimezone();
return this.timezone === 'browser' ?
return timezone === 'browser' ?
moment(date).format(format) :
moment.utc(date).format(format);
}
......
......@@ -56,6 +56,7 @@ export class TimePickerCtrl {
if (moment.isMoment(timeRaw.to)) {
timeRaw.to.local();
}
this.isUtc = false;
} else {
this.isUtc = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment