feat(preferences): got timezone option to work on org and profile level, as well as dashboard

This commit is contained in:
Torkel Ödegaard
2016-04-03 06:05:43 -07:00
parent cab859a0e4
commit b30b78e442
8 changed files with 23 additions and 13 deletions

View File

@@ -8,7 +8,7 @@ export class TableRenderer {
formaters: any[];
colorState: any;
constructor(private panel, private table, private timezone) {
constructor(private panel, private table, private isUtc) {
this.formaters = [];
this.colorState = {};
}
@@ -45,7 +45,7 @@ export class TableRenderer {
return v => {
if (_.isArray(v)) { v = v[0]; }
var date = moment(v);
if (this.timezone === 'utc') {
if (this.isUtc) {
date = date.utc();
}
return date.format(style.dateFormat);