Hello,
I have a column with this this format:
this.dateFormat = {type: 'dateTime', format:'y/M/d h:m z'};
and it produces this output: "2021/8/12 11:41 GMT-5". How do I get the GMT-5 to show the friendly timezone string instead? I had the locale property set to 'en' for the grid, but that didn't seem to matter. (By friendly I mean something like "CST" "UTC" etc...)
Thanks,
Scott
|
Public flag = true;
beforeDataBound(args) { if (this.flag) {
new DataUtil.serverTimezoneOffset = 0;
this.flag = false;
}
} |
I'll give that a shot but just to be clear, I'm OK with the timezone conversion happening...I just want the format of the date to include the localized version of a timezone (ie, 'UTC', 'CST', 'CDT' etc...) instead of just showing this: 'GMT-5' etc..
|
npm install cldr-data –save |
|
import * as cagregorian from "./ca-gregorian.json";
import * as currencies from "./currencies.json";
import * as numbers from "./numbers.json";
import * as timeZoneNames from "./timeZoneNames.json";
import { L10n,loadCldr, setCulture, setCurrencyCode, Internationalization} from '@syncfusion/ej2-base';
loadCldr(cagregorian, currencies, numbers, timeZoneNames); setCulture('de');
setCurrencyCode('EUR');
|
|
import { L10n } from '@syncfusion/ej2-base';
L10n.load(require('@syncfusion/ej2-locale/src/de.json')); |