mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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
This commit is contained in:
parent
b8aa203707
commit
1499c2bf74
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user